• Page 1 of 2
  • 1
  • 2
  • »
uCoz Community » uCoz Modules » File Catalog, Site Catalog, Publisher, Ad Board, Online Games » Available for users only Script in File Catalog
Available for users only Script in File Catalog
Ron6875
Posts: 56
Reputation: 0

Message # 1 | 4:15 PM
I wanted to put that script below into my file catalog.. I wanted to change the "Available for users only" into my own like "Please register to see th link".. but it doesn't seem to work.. It works perfectly in my forum.. How can I make it to work? Can someone please help me.. Thanks..

Code
<script>   
     e=document.getElementsByTagName("span");   
     for(i=0;i<e.length;i++) {   
     if(e[i].className=='UhideBlockL') {   
         e[i].innerHTML=e[i].innerHTML.replace('Available for users only','<font size="3" face="Comic Sans MS"><b>Dear Guest, You are not a Registered User. Please Register or Login first to see the links. Thanks.</b></font>');   
     }   
     }   
     </script>
rebelion
Posts: 130
Reputation: 4

Message # 2 | 9:44 PM
Ron6875, use Conditional Operators.
project-implement.com join rsps 508/525
Ronzky
Posts: 56
Reputation: 0

Message # 3 | 10:02 PM
will you give some other clue..? i really cant get it..
rebelion
Posts: 130
Reputation: 4

Message # 4 | 10:05 PM
Ronzky, just change the users permissions by going to users >> user groups >> choose guest or any group >> file catalog
and edit it.

project-implement.com join rsps 508/525
Animorph
Posts: 2856
Reputation: 189

Message # 5 | 11:36 AM
rebelion, i don't see how this is related to group permissions Ronzky's, script is to the text into the hide tags that he posts in forum , but he wants a version that works for file catalog too

Ronzky, i re-tested the code for you and it works for File Catalog also

just go to CP ---> Design ---> Design management (templates) ---> File Catalog ---> All pages with $BODY$

add this after $BODY$:

Code
<script>    
      e=document.getElementsByTagName("span");    
      for(i=0;i<e.length;i++) {    
      if(e[i].className=='UhideBlockL') {    
          e[i].innerHTML=e[i].innerHTML.replace('Available for users only','<font size="3" face="Comic Sans MS"><b>Dear Guest, You are not a Registered User. Please Register or Login first to see the links. Thanks.</b></font>');    
      }    
      }    
      </script>

To busy building a passive income online ;)
Ronzky
Posts: 56
Reputation: 0

Message # 6 | 4:21 AM
The code doesn't work on me.. I dont know why.. I also have another problem.. I dont have an option to select a category but I have my categories.. Image below..
Attachments: 7540186.jpg (63.0 Kb)
Animorph
Posts: 2856
Reputation: 189

Message # 7 | 12:49 PM
Ronzky, you need to add catagory's through your control panel and to make them appear ,
CP ---> File Catalog ---> Categories management ---> Add category's

or be specific about what happened


To busy building a passive income online ;)
Ronzky
Posts: 56
Reputation: 0

Message # 8 | 12:52 PM
fixed the category problem... but the code is not working in my file catalog.. the links are still Availabe for users only
Post edited by Ronzky - Sunday, 2011-04-17, 12:55 PM
Animorph
Posts: 2856
Reputation: 189

Message # 9 | 1:16 PM
Ronzky,

it works correctly on your site happy

Attachments: 8660032.png (9.7 Kb)

To busy building a passive income online ;)
Ronzky
Posts: 56
Reputation: 0

Message # 10 | 1:18 PM
what did you do?
Animorph
Posts: 2856
Reputation: 189

Message # 11 | 1:21 PM
Ronzky, put the code after $BODY$ like i said before.
To busy building a passive income online ;)
Ronzky
Posts: 56
Reputation: 0

Message # 12 | 1:23 PM
i only added it to the category contents.. my fault.. :D.. thanks a lot for the help...
sumeetm4u
Posts: 12
Reputation: 0

Message # 13 | 5:44 AM
When i am adding this code then it shows error the template not contain "$Powered By$".....Please help me.......
Visit to pctricksandtips.ucoz.com
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 14 | 7:35 AM
sumeetm4u, you need to add in the $POWERED_BY$ code. This has nothing to do with this script, simply that you need to have the uCoz zopyright somewhere on your site. on all pages.

Hope this helps. happy

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
sumeetm4u
Posts: 12
Reputation: 0

Message # 15 | 7:47 AM
Quote (Paradox)
you need to add in the $POWERED_BY$ code. This has nothing to do with this script, simply that you need to have the uCoz zopyright somewhere on your site. on all pages.

Hope this helps.


I tried but nothing happens please check by going on my site...............

Visit to pctricksandtips.ucoz.com
uCoz Community » uCoz Modules » File Catalog, Site Catalog, Publisher, Ad Board, Online Games » Available for users only Script in File Catalog
  • Page 1 of 2
  • 1
  • 2
  • »
Search: