Scrolling Privileges

Replaces long list of can and can't with scrolling text.

Scrolling Privileges

PostAuthor: Michaelo » Thu Sep 01, 2005 8:31 pm

Replaces long list of You Can and You Can't (privileges) with a scrolling text line. Installed on this site!

Status: Release (Remember to mod your templates).

START Scrolling Privileges Mod By Michaelo August 2005

OPEN

viewforum.php

FIND

$template->assign_vars(array(
   'FORUM_ID' => $forum_id,

AND BEFORE IT ADD

if($userdata['user_style'] == *NOTE* || $userdata['user_style'] == *NOTE* || $userdata['user_style'] == '') 
   $s_auth_can = str_replace('<br />', "... ", $s_auth_can);


OPEN

viewtopic..php

FIND

$template->assign_vars(array(
   'L_DOWNLOAD_POST' => $lang['Download_post'],

AND BEFORE IT ADD

if($userdata['user_style'] == *NOTE* || $userdata['user_style'] == *NOTE* || $userdata['user_style'] == '') 
$s_auth_can = str_replace('<br />', "... ", $s_auth_can);

SAVE EDITS

END Scrolling Privileges Mod By Michaelo August 2005


Each template will do the next bit differently so I have given an examples.

OPEN

viewtopics_body.tpl and viewforums_body.tpl

FIND

{S_AUTH_LIST}

AND

encapsulate in a table like below

viewtopic_body.tpl
<table class="whitebox" width="100%" cellpadding="0" cellspacing="0" border="0">   
   <tr>
      <td height="15"><img src="images/spacer.gif" alt="" width="8" /></td>
      <td align="right" width="100%">
      <!-- Michaelo's right mod scrolls rights in single line -->
         <marquee id="rights" behavior="scroll" direction="left" width="100%" height="12" scrolldelay="60" scrollamount="2"  loop='-1' onmouseover='this.stop()' onmouseout='this.start()' >
         {S_AUTH_LIST}
      </td>
      <td height="15"><img src="images/spacer.gif" alt="" width="8" /></td>
   </tr>
</table>


view_forum_body.tpl
<table width="100%" cellpadding="1" cellspacing="1" border="0" >
   <td align="right" valign="top"><span class="gensmall">
      <div align="left"><b>{L_RIGHTS}</b></div>
      <!-- Michaelo's scrolling privileges mod scrolls rights in single line -->                                 
      <marquee id="rights" behavior="scroll" direction="left" height="12" scrolldelay="20" scrollamount="2"  loop='-1' onmouseover='this.stop()' onmouseout='this.start()' >{S_AUTH_LIST}
   </td>
</table>



*NOTE*: It is possible to add this mod to one, two, three one by one or all templates at one time. This allows you to update templates at your leisurely. The only requirement is you need to know the ID of the templates you have modified (get it from phpmyadmin).

Then update the code (at top op post and) and replace each *NOTE* with the template ID. I have included *NOTE* twice to allow for two templates but you can have as many as you need but each must have '|| $userdata['user_style'] == ID'

The following code processes Templates whose ID's are 1 and 7

if($userdata['user_style'] == 1 || $userdata['user_style'] == 7 || $userdata['user_style'] == '')

(More code and notes added tomorrow)

Mike
phpBB 3 Demo Site: Here!
phpBB 3 0.3.2 Test Site: Here!
User avatar
Michaelo
Site Admin
 
Posts: 142
Likes: 0 post
Liked in: 0 post
Images: 0
Joined: Wed Jul 20, 2005 4:44 pm
Cash on hand: 0.00
Location: Dublin
Blog: View Blog (0)

Return to Scrolling Privileges

Who is online

Registered users: Blue Steel

cron