![]() |
I'm just waiting on a question
It should be done by the weekend :) - miSt |
Ok, I finally found a way to have the edit button only show up for the user who wrote the post and the moderator of that forum. If you are not a moderator of the forum, you will not see the edit button unless it is your post. First of all, you need to install Logician's Dynamic Template hack. Once that is installed, go to your "postbit" template and enter the code like this and viola!
Code:
[[((ismoderator($thread['forumid'])) or $post[userid]==$bbuserinfo[userid])]] |
Hehe i gave up on this project - i know so much more. I'll try and get this done without using dynamic templates :)
- miSt |
I gave you the answer. Shouldn't be too hard.
|
The point of this was for the report button as well - that's the problem. I wanted to get it all in one code statement but i have an idea how to do it when i get some time.
- miSt |
Mist,
Great hack but there are a couple of problems in the current version: 1) you are running ismoderator() for each post on the page. This is serious because if you have 40 posts on the page, it would add 40 queries to the page and that's just plain murder for the server. 2) if you have a max edit time, the button should change from edit to report once the user is no longer able to edit the post. I've attached your hack in this post with the above problems fixed. |
Thanks buddy for that fix. I've updated the first post and added credits in the textfile to you too.
Regards - miSt |
Can you advise on which changes need to be made if just upgrading from 1.2 to 1.3 ?
|
If you have the instructions from v2 then simply undo the changes to the php files and then re-apply the new changes in v3.
If you haven't then i'll write a textfile on how to upgrade - miSt |
LOL - I just looked at the instructions and I understand how this things works ...
I'll nut it out - thanks to you both :) :) [high]* Natch is a bit lazy eh ?[/high] |
All times are GMT. The time now is 09:43 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|