The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Code to show button Only for Mods/Admins

2 posters

Go down

Code to show button Only for Mods/Admins Empty Code to show button Only for Mods/Admins

Post by ElMuggs January 17th 2012, 5:01 am

Okay so I have a feeling that this is impossible but I've got a 'approve' button that automatically adds a Approved Message to a post.

Simple enough to do but I just need a some code to ensure the button itself ONLY shows up for Mods/Admins.

Any takers?



ElMuggs
ElMuggs
Forumember

Posts : 91
Reputation : 17
Language : CSS / HTML / BBcode / Javascript / Graphics and Tech Support yeech..
Location : Deep in the belly of the code

http://wizardswb.forumotion.com

Back to top Go down

Code to show button Only for Mods/Admins Empty Re: Code to show button Only for Mods/Admins

Post by Guest January 17th 2012, 2:19 pm

If you would like to create a HTML button that shows only for staff, I think this is not possible. But I have a personally theory that this may be possible via Templates. As you know, the moderation buttons (delete/move/lock/unlock topic and the rest) are visible and also avaible only for staff members. You can try to put the HTML buttons near that moderation buttons or other things that are avaible only for staff members.

You would know that this idea came to me right now, and I don't know exacly if works. But should be a nice trick. Very Happy
avatar
Guest
Guest


Back to top Go down

Code to show button Only for Mods/Admins Empty Re: Code to show button Only for Mods/Admins

Post by ElMuggs January 17th 2012, 3:36 pm

Yeah I'm template hackin' to make it work Wink

alas the delete/lock etc. buttons are just {S_TOPIC_ADMIN} in the template. so no help I'm afraid.
ElMuggs
ElMuggs
Forumember

Posts : 91
Reputation : 17
Language : CSS / HTML / BBcode / Javascript / Graphics and Tech Support yeech..
Location : Deep in the belly of the code

http://wizardswb.forumotion.com

Back to top Go down

Code to show button Only for Mods/Admins Empty Re: Code to show button Only for Mods/Admins

Post by Guest January 17th 2012, 3:49 pm

How about this code from viewtopic_body:
Code:
      <!-- BEGIN moderation_panel -->
      <td align="center">
         <span class="gensmall">{moderation_panel.U_YOUR_PERSONAL_MODERATE}</span>
      </td>
      <td align="center" width="250">
         <span class="gensmall"> </span>
      </td>
      <!-- END moderation_panel -->
So, I think you should put HTML code(s) between:
Code:
<!-- BEGIN moderation_panel -->
and:
Code:
<!-- END moderation_panel -->
avatar
Guest
Guest


Back to top Go down

Code to show button Only for Mods/Admins Empty Re: Code to show button Only for Mods/Admins

Post by Darren1 January 17th 2012, 4:03 pm

Hi,

Please call it 'template modifying' hacking is such a worse work Wink

You can modify the template to do so.
In the view_topic(general) theres a code:
Line432 by default.
Code:
<span class="gen">{L_MOD_TOOLS}<br />{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /> <br /> My personal edit 7777777 here</span>

replace 'My personal edit here 7777' with yours, and when searching, my text isn't there Wink

If you add in where gassy suggests it looks messy :/
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum