The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
disable new thread button in a forumid mod
Hi there
I'm not a coder i know i can disable the new thread button with the usergroup permission. But if i wanna disable the new thread button in a forum for all users but don't wanna change the permission because this group need to create new thread in other forums? example i have create a forumid 126 and i wanna change the link for the new thread button of this forum, i changed my forumdisplay template (add blue text): <if condition="$forumid <> 126"> <if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </if></td> <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if> <else /> <if condition="$show['newthreadlink']"><a href="http://www.bobmarleymagazine.com/forum_bmwm/misc.php?do=form&fid=1" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </if></td> <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if> </if> the question is: if i wanna create a simple mod where i go in the vbulletin option and select my mod (example "disable new thread button") and there i have a one simple line text field where i put the exclusion forumid and so change the variable in my condition above (note: without the change link button only for disable it) how can i do? <if condition="$forumid <> variable of my mod"> <if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </if></td> <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if> </if> somebody can help me to create this little mod? |
#2
|
||||
|
||||
I'm stuck on this line:
Quote:
|
#3
|
||||
|
||||
yes lynne thanks but if i wanna create this little mod for disable and change the link you can help me?
|
#4
|
||||
|
||||
Well, OK....
You'd have to turn on debug mode to add the setting. Let's say you call it "yoursetting" and you put in a series of forumids, x,y,z. You now have an array which you will have to explode in a plugin to use: PHP Code:
HTML Code:
<if condition="in_array($threadinfo[forumid], $yourforums)">
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|