The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Code to show button Only for Mods/Admins

View previous topic View next topic Go down

Code to show button Only for Mods/Admins

Post by ElMuggs on 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
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

Re: Code to show button Only for Mods/Admins

Post by Guest on 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

Guest
Guest


Back to top Go down

Re: Code to show button Only for Mods/Admins

Post by ElMuggs on 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
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

Re: Code to show button Only for Mods/Admins

Post by Guest on 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 -->

Guest
Guest


Back to top Go down

Re: Code to show button Only for Mods/Admins

Post by Darren1 on 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
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

View previous topic View next topic Back to top


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