View Full Version : make a plugin to disable subscription and delete some style parts
cloferba
10-18-2010, 04:41 PM
hello!
every time i update my vbulletin, i get angry because i want to delete subscription, attachment and other options when i create a thread..
so..i have to delete those parts of my skin....but every time i update vbulletin, the vbulletin admin panel ask me to rebuild some parts of my skin
i hated it! i want to definitivily delete those options and dont be asked again by the adminpanel to rebuild
what do i need to do? make a plugin to delete all time those parts of my skin?
Lynne
10-18-2010, 05:12 PM
Do you mean get rid of all additional options? You can just set $show['additional_options'] to false in newthread_form_complete. I don't know how well that would work - what it would do as far as the options you were supposed to pick. But, you can try it on your test site.
cloferba
10-19-2010, 01:14 PM
which is the syntaxis?
so i can write at the top of newthread something like
['attachment_options'] = false
['subscription_options'] = false
['PostingPermissions_options'] = false
is that?
Lynne
10-19-2010, 02:01 PM
No.
If you look at the newthread template, there is a condition around all the additional options:
<vb:if condition="$show['additional_options']">
<h3 class="blockhead">{vb:rawphrase additional_options}</h3>
a whole bunch of stuff....
</vb:if>
So, if you write a plugin that sets $show['additional_options'] to false, then none of the additional options will be shown. Go look and you'll see what I mean.
cloferba
10-19-2010, 03:11 PM
thanks lynne...i now understand what are you saying,
but i have not idea which is the correct parameter i have to write in the plugin to set additional options to false
i mean, im a noob programming, and i dont know the basic structure, also in vbulletin help there is no help about basic structure to set off a variable
Lynne
10-19-2010, 07:32 PM
All you need to do in the plugin is literally set it to false:
$show['additional_options']=false;
I'd try the newthread_form_complete hook location.
cloferba
10-20-2010, 12:54 AM
thanks! it worked!...
and to disable Posting Permissions information when you create or reply a thread?
Lynne
10-20-2010, 03:28 AM
That has it's own template, forumrules. If you look at the top there, there is a condition. Just add in the condition to not include it for the newthread or newreply page.
cloferba
10-20-2010, 05:32 PM
the only related thing i could find in showthread for example, is
<div id="posting_rules" class="thread_info_block">
{vb:raw forumrules}
</div>
so..it should be something like
{vb:raw forumrules}=false
?
Lynne
10-20-2010, 05:42 PM
I said it was in the template called forumrules. There is a condition at the top of it. You can add to that condition.
cloferba
10-20-2010, 07:33 PM
i see:
<vb:if condition="THIS_SCRIPT == 'showthread' || THIS_SCRIPT == 'forumdisplay'">
you have said lynne: Just add in the condition to not include it for the newthread or newreply page.
well im not quite sure where i have to write "forumrules" to dont show that box.
sorry for be "so stupid", but im not very good with codes, specially when i have never studied how to programm
im talking about this box:
http://img833.imageshack.us/img833/2453/39426929.gif
Lynne
10-21-2010, 12:02 AM
Above this line:
<vb:if condition="THIS_SCRIPT == 'showthread' || THIS_SCRIPT == 'forumdisplay'">Add the condition regarding the other pages like this:
<vb:if condition="THIS_SCRIPT != 'newthread' AND THIS_SCRIPT != 'newreply'">
<vb:if condition="THIS_SCRIPT == 'showthread' || THIS_SCRIPT == 'forumdisplay'">
and then add at the very bottom:
</vb:if>
cloferba
10-21-2010, 10:37 PM
ready! now, i dont see posting permissions when i create or reply a thread...
but i keep seeing it when i see a thread (showthread)
i think <vb:if condition="THIS_SCRIPT == 'showthread' || THIS_SCRIPT == 'forumdisplay'"> is not working ok maybe?
Lynne
10-22-2010, 12:18 AM
You said:
and to disable Posting Permissions information when you create or reply a thread?
So that is the code I wrote. If you don't want it on showthread either, then just add in THIS_SCRIPT != 'showthread' into the first condition.
cloferba
10-22-2010, 07:31 PM
so this part != was the trick...
thanks lynne! :D
greetings :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.