Remove buttons in a "Locked Topic"

Started by Chas Large, June 30, 2009, 07:28:01 AM

Previous topic - Next topic

Chas Large

I have a mod installed on 1.1.9 which places the REPLY button in every post. This is very useful. However the button remains when the topic is locked and generates an error if clicked.

The Mod writer is unable to help me fix the mod and does not seem to know how the Locked Topic feature removed buttons.

Can anyone please explain or push me in the direction of a topic/post/tutorial that I can read to find out how the Locked Topic feature works so that I can modify the code to remove this button in a locked topic. I really don't want to remove the mod and am interested in producing mods of my own.

Any guidance gratefully received.

Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

N3RVE

I'll need to see a link to your site as well as a link to the mod, this way I can give you the necessary code changes to check if a topic is locked before displaying the reply button.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Chas Large

#2
Quote from: [n3rve] on June 30, 2009, 08:04:11 AM
I'll need to see a link to your site as well as a link to the mod, this way I can give you the necessary code changes to check if a topic is locked before displaying the reply button.

-[n3rve]
OK. Here is a Public access board on my test and development forum. I've created some posts and locked the topic so you can see the reply button is there on each post.

http://www.fiftyplusforum.co.uk/devtest2/index.php?topic=48.0

The other button I wanted to remove was the PRINT button though really just to learn how these buttons are created and displayed.

Thanks

Chas

Sorry, forgot to add link to the MOD: http://custom.simplemachines.org/mods/index.php?mod=1755

and the support Topic: http://www.simplemachines.org/community/index.php?topic=303592.0
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

N3RVE

#3
I replied to the Support topic.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Chas Large

Quote from: [n3rve] on July 01, 2009, 05:01:24 AM
I replied to the Support topic.

-[n3rve]
Many thanks for that [n3rve]. It worked fine when editing the display.template.php. I have learned something today.

Regards

Chas.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Advertisement: