PDA

View Full Version : Need help customizing a page


RobinatPJRC
07-05-2013, 07:03 PM
I'm looking for some help in figuring out how to customize a page for a specific forum. One of the forums on our vBulletin site is for posting technical support questions. We've posted a sticky giving instructions on how to post tech support questions (need screen shots of error messages, complete copy of code, etc) but people seem to forget that when they click on the Post New Thread button and start typing away. We're getting too many poor quality messages asking for help.

I would like to customize the post new thread page (the one with the dialog box where the users start typing their question) to include basic guidance and etiquette for asking tech support questions. It looks like I should be able to do this by using styles, but I'm not quite sure how to go about doing it. Is there anyone who can give me some guidance.

I apologize if I'm posting this on the wrong forum. If there is a better place for me to be asking my questions I will happily post there.

tbworld
07-05-2013, 10:32 PM
Are you looking to add informational paragraphs or an additional form (questions that need answering)?

RobinatPJRC
07-06-2013, 01:19 AM
I'm looking to add additional text/paragraph to the Post New Reply page for a specific forum.

tbworld
07-06-2013, 05:49 AM
Which template are you refering to:
forumdisplay
newthread
newreply

if you do not know how to find the right template let me know.

RobinatPJRC
07-06-2013, 04:07 PM
I think it's the newthread template. How can tell for certain?

tbworld
07-07-2013, 12:29 AM
In:
admincp->settings->General Settings->Add Template Names in HTML Comments->YES

This will add a comment field in your HTML source with the template name. Then just use your browser to look at the webpage HTML source for the template name comment. In this case it will most likely be at the very top of the page. Or you can search the source for one of the template names in the last message. I prefer Firefox for this with firebug, but all the major browsers have similar tools.

The other way to find the right template is to use template search in admincp. Here you can look for text or phrase in a template. See vbulletin manual for more information if you need it. Trial-and-error will get you what you want.

If you cant find it. Just take a web-snapshot of the page and post it here. (Try to do it in the default vbulletin style ... ).

Once you have the template. Inserting a block is easy, the more difficult part in this case is the styling... but it is easy enough. We will also need to add a conditional, because I believe you wanted this only for a particular forum.

I hope this is clear, I need sleep, jet lagged. :)

RobinatPJRC
07-07-2013, 04:52 PM
Your directions were great. Yep, it's the newthread template that I want to edit.

The first few lines of the source from the page I want to edit are
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- BEGIN TEMPLATE: newthread -->

I really appreciate your help with this!

I want to add text to this template, something to the effect of "If you want help, post screenshots of error messages and your code!", but only on the 1 of the 5 forums we have (The Tech support forum).

tbworld
07-07-2013, 08:45 PM
This should get you started... Replace the $forumid number with your technical support forum id from your admincp->forum manager.

I gave you a couple vanilla vbulletin HTML and CSS constructs (code) that you can use almost anywhere in vb. I was not sure how advanced you were and wanted to pass a working example. Change the $forumid number and place the code in the template: under the {vb:raw navbar}. Of course you can change and move the block where-ever you want.
That should give you enough to chew on and a starting point. :)


This is more code then you need, but it will give you some simple concepts to work with. I added the inline CSS for simplicity, but you really should add classes to your
"additionalcss" template instead.

<vb:if condition="$forumid == 82"> <!-- replace your forumid here -->
<div style="margin: 50px 100px; color: red;"> <!-- fluid with margins -->
<vb:comment> <div style="width: 800px; margin: 0 auto; color: red;"> <!-- Fixed width centered --></vb:comment>

<!-- If you want a Header -->
<h2 class="blockhead">USER NOTES HEADER</h2> <!-- blockhead class - Uses vb stylevars for a quick header -->
<div class="blockbody formcontrols floatcontainer"> <!-- blockbody formcontrols classes - Creates quick body with border -->
<div class="blockrow">
<p>If you want help, post screenshots, additonal information can be found below ...</p>
</div>

<!-- If you need a sub-head -->
<h3 class="blocksubhead">My Sub Head</h3>
<div class="blockrow">
<p style="color: green;">If you want help, post screenshots, additonal information can be found below ...</p>
</div>

</div>
</div>
</vb:if>