The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Edit StyleVars page Details »» | |||||||||||||||||||||||||||||||||
This is just a new page for showing the .css template and having all the stylevars clickable and then editable in the bottom screen. This uses iframes, so if you browser doesn't support that, then it won't work and I cannot help you with this.
You will need to open up and edit the admincp/template.php file. **edited for 4.1.11 below** Basically just add the code in red to the existing code. Find (under $_REQUEST['do'] = 'add'): Code:
print_textarea_row($vbphrase['template'] . ' <br /><br /> <span class="smallfont">' . iif($vbulletin->GPC['title'], construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&title=" . $vbulletin->GPC['title'], 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />--> </span>', 'template', $templateinfo['template_un'], 22, '5000" style="width:99%', true, true, 'ltr', 'code'); Code:
$isscss = strpos($vbulletin->GPC['title'],'.css'); print_textarea_row($vbphrase['template'] . ' <br /><br /> <span class="smallfont">' . iif($vbulletin->GPC['title'], construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&title=" . $vbulletin->GPC['title'], 1) . '<br /><br />', '') . iif($isscss === false AND $vbulletin->GPC['dostyleid'] != -1, '', construct_link_code('Edit StyleVars', "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=editcss&dostyleid=" . $vbulletin->GPC['dostyleid'] . "&title=". $vbulletin->GPC['title']."&templateid=" . $vbulletin->GPC['templateid'], 1) . '<br /><br />') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />--> </span>', 'template', $templateinfo['template_un'], 22, '5000" style="width:99%', true, true, 'ltr', 'code'); Code:
print_textarea_row($vbphrase['template'] . ' <br /><br /> <span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&title=$template[title]", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />--> </span>', 'template', $text, 22, '5000" style="width:99%', true, true, 'ltr', 'code'); Code:
$isscss = strpos($template[title],'.css'); print_textarea_row($vbphrase['template'] . ' <br /><br /> <span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&title=$template[title]", 1) . '<br /><br />', '') . iif($isscss === false AND $template['styleid'] != -1, '', construct_link_code('Edit StyleVars', "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=editcss&dostyleid=" . $template['styleid'] . "&templateid=$template[templateid]", 1) . '<br /><br />') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />--> </span>', 'template', $text, 22, '5000" style="width:99%', true, true, 'ltr', 'code'); PHP Code:
PHP Code:
If you click that, you get a new tab with the .css template in the top box (not editable on this page) and it has all the *editable* stylevars clickable (for example, in userprofile.css, they use variables, not stylevars, so you won't have clickable stylevars there). If you click on a stylevar, it will open in the bottom of the window and you may edit. Tested in Firefox, Safari, Chrome, and Opera on my Mac. And thank you to ForumsMods for sharing a diff file - patch.zip (for version 1.1, which works, but doesn't have css changes) 1.2 - 2011-02-11 - changed some CSS for the divs and fixed a phrase. 1.3 - 2012-03-10 - added a file with the changes needed for 4.1.11 Download Now
Screenshots
Show Your Support
|
Благодарность от: | ||
Hippy |
Comments |
#32
|
|||
|
|||
Ok reporting back. I double checked all of my edits and I found 4 of them were merged so I fixed but results still the same
|
#33
|
||||
|
||||
I would suggest starting with a totally new file and redoing the file edits. Only this time, make sure you put the code on their own lines and not merge lines at all.
|
#34
|
||||
|
||||
I pulled the changes out from the code it self and added it in it's correct line since a couple things changed since then..this worked up till 4.1.6 then 4.1.7 it will no longer work..
the edits where perfect.. did it 2 times to make sure , used compareit.. when you click on the style manager in the admincp you just get a blank screen code used .. PHP Code:
PHP Code:
PHP Code:
Code:
print_cp_footer(); any help with this would be great thanks for sharing this great mod lynne |
#35
|
||||
|
||||
I just went through and modified my template.php file for 4.1.7 using the instructions in post 1 and it is working just fine on my site. I am getting no blank screens. I'd suggest you check your error_logs.
|
#36
|
||||
|
||||
yep I should of though of that ..
this is the error PHP Parse error: syntax error, unexpected ';' in /public_html/testvb/admincp/template.php on line 2224, line 2224 is Code:
'template', $templateinfo['template_un'], 22, '5000" style="width:99%', true, true, 'ltr', 'code'); this line was not even touched |
#37
|
||||
|
||||
my bad I see where I went wrong...
|
#38
|
||||
|
||||
Glad you got it figured out.
|
#39
|
||||
|
||||
thanks you for providing this for everyone..
should be default with vb.. I don't know what I was thinking when I was editing that file.. I been fixing so much broken stuff these past few days.. I need a break to get back on track.. once again your efforts and support are very much appreciated.. |
#40
|
||||
|
||||
Sweet!
|
#41
|
||||
|
||||
Hi Lynne
this was driving me crazy today after checking over and over my edits .. I realized this was not a edit issue it was a IE9 issue.. I checked in ff and worked like it should.. whats happening is everytime you mouse over a style var in the template the space between the 2 boxes grow I attached a couple screen shots so you can see what I mean.. thanks |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|