View Full Version : questions!
pokash
11-28-2009, 10:32 PM
Hi
I have a lot of questions:
I want to change some things in the tab menu: I want to change the title of the first tab 'forum' and I want to get rid of the 'what's new' tab.
Then I want to get rid of the navigation part under the tabs and add some of it's links to top right where it says Welcome, username Notifications.. etc.
I also want to have a section above every category where I can place Some content in a html format (just like the admanager but then the content should only appear above the specific category)
I want to get rid of the the text and links that show in what part of the forum you are (has a little home on the left). On the home page it currently says: Forum.
Under the'post new thread button it says : Forum: and the the category name. I want to get rid of this also.
Help me please:)
Little rant:
I honoustly don't understand how some of you make sense out of the cp. When you want to change this you need to go here and here and then do that and the next time you have forgotten how you did it again. This whole template system and phrase system..... man o man what a pain.
Lynne
11-28-2009, 10:36 PM
You are going to want to edit at least the navbar template for a lot of that (anything to do with the tabs).
As for adding more text and removing other text, that is probably also going to require editing a template. To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.
pokash
11-29-2009, 01:02 PM
Well the last one hour and a half I have been able to do two things:
Change the name of the tab 'forum'
Get rid of the welcom message
Now I realy don't know how to get rid of the 'what's new tab'. I think I've found the code in the source:
<li><a class="navtab" href="search.php?do=getnew&contenttype=vBForum_Post">What's New?</a></li>
But I've tried deleting this piece of code and other pieces that resembled it but it doesn't seem to do anything (navbar template):
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
In the source code it all seems so simple but when I get to the templates it has all this stuff that I can't realy make sense of.
Another thing that I still don't know how to acomplish exaxtly is putting static content on top of a specific category. The only option I see is doing it with a announcement but I'm not sure if I can put html in that.
And to remove the part with the litle house with 'forum' next to it, I haven't found a way to do that either.
Lynne
11-29-2009, 01:54 PM
To remove the whole What's New tab:
Find and remove from the navbar template all the stuff between this line " {vb:raw template_hook.navtab_middle}" and this line "{vb:raw template_hook.navtab_end}". I think that should do it (I haven't tried it).
pokash
11-29-2009, 05:45 PM
That did the trick except it also removed my other added tabs. But I found the piece of code that did only remove the whats new tab withing that area of the code. So thanks!
Do you have any suggestions for placing content above a specific section?
Lynne
11-29-2009, 06:10 PM
I would guess you would edit the template. I really don't know where you are talking about adding something, so I can't be more specific. An image would help.
pokash
11-29-2009, 07:05 PM
Lets take the the page your on right now for example. I want to be able have a section of content above the posts. And be able to have this specific content only above this topic.
If you still dont know what I mean I will put a picture up.
Lynne
11-29-2009, 07:19 PM
Then you probably want something in the SHOWTHREAD template and you'll want to put a condition about it:
<if condition="$thread[threadid] == xx">
stuff
</if>
There are other ways to do it (plugin, for instance), but that is probably the easiest for a beginner.
pokash
11-29-2009, 08:25 PM
What is an example of an thread id? And instead of above a thread I want the content above all threads of a certain category/forum. So instead of $thread[threadid] I use ?
Can I use that code also in the AD template? I think that might be simpler for me.
Lynne
11-29-2009, 08:36 PM
If you want a condition in the SHOWTHREAD template based on the forumid, then either $thread[forumid] or $forum[forumid]:
<if condition="$forum[forumid] == xx">
stuff
</if>
Where xx is the forumid (from the forum manager).
You can try it in an ad template (I don't use those, so don't know for sure).
pokash
11-29-2009, 09:38 PM
I haven't had any succes with this. Is this the right code to use:
<if condition="$forum[forumid] == 3">
stuff
</if>
And when
Where in the showthread template should I add this code to have it under the navbar?
Lynne
11-29-2009, 09:48 PM
Did you try $thread[forumid] (or even $threadinfo[forumid]) which was the other variable I suggested (I have a feeling $forum may not be registered)? If you want it right under the navbar, then I'd put it right under where it says "{vb:raw navbar}".
pokash
11-29-2009, 11:34 PM
Both of those don't seem to be working either. Could you give an example of what the code might look like?
I have tried many different things with this code already and I'm having no succes of any content showing above the forums.
How do I know what id a certain forum is? Is it the display order? or the name? or something else?
Also I keep getting this error:
The following error occurred when attempting to evaluate this template:
The conditional on line 84 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Lynne
11-30-2009, 03:42 AM
Ack! I missed that this was in the vb4 section.
<vb:if condition="$thread[forumid] == xx">
stuff
</vb:if>
Try that (or $threadinfo[forumid]). You would get the forumid from the forum manager. Seelct a forum to edit, and on the top it will say something like "Forum: Main Category (id: 1)". In that case, it is forumid 1.
pokash
11-30-2009, 10:51 AM
I've tried many different settings position templates but I never see any content. Also when I go to the ad manager and give the condition of a specific forum it doesn't show anything either.
Lynne
11-30-2009, 01:32 PM
Are you making changes to the correct style? Try not using a condition and just put HELLO in there. Add the condition after you verify that you are actually modifying the templates correctly.
pokash
11-30-2009, 04:45 PM
<vb:if condition="hello">
stuff
</vb:if>
If I put this in the adtemplate I can see the content. But when I put in the showthread template wherever I put I don't see anything.
When I do put an condition in the ad template I again get nothing. Like this:
<vb:if condition="$thread[forumid] == 3">
stuff
</vb:if>
Even if I just put a div with content on the showthread template I see nothing.
So maybe I should continue with the ad template?
Lynne
11-30-2009, 05:07 PM
Then try $threadinfo['forumid']. Is there a forum with the id of 3? Which ad template are you using? Check to see if the variable $thread is even registered for use in it. If not, then you need to either preregister it or just use the showthread template.
pokash
11-30-2009, 05:10 PM
If in the advertising I put in the condition: Show If user is browsing forum: ''. Then nothing shows at all either.
--------------- Added 1259608411 at 1259608411 ---------------
Then try $threadinfo['forumid']. Is there a forum with the id of 3? Which ad template are you using? Check to see if the variable $thread is even registered for use in it. If not, then you need to either preregister it or just use the showthread template.
I have tried all variations. Yes there is a forum with id 3 and I have tried many other as well. And like I said in the showthread template I can't get any content to show at all.
How do I register the variable $thread?
Lynne
11-30-2009, 05:23 PM
And like I said in the showthread template I can't get any content to show at all.
Then you are doing something wrong. I just tested this by adding these lines below the navbar in the SHOWTHREAD template:
<vb:if condition="$threadinfo['forumid'] == 2">
<div>stuff</div>
</vb:if>
And I got this in showthread.php in forumid 2:
https://vborg.vbsupport.ru/attachment.php?attachmentid=106966&stc=1&d=1259608977
pokash
11-30-2009, 05:53 PM
Ok I think you have not understood what I meant. I want contecnt above sections (that contain forums and don't act as forums themselves)
So I probably should be editing the forumdisplay template right?
Is there a different variation for the code?
I finally saw some content on showthread.php?2-null-thread when I added you last given code. But now I need to get it on top of a forumdisplay.php.
BBR-APBT
11-30-2009, 06:41 PM
Make a new plugin and add something like this. The hook location for the plugin should be forumdisplay_start.
if (THIS_SCRIPT == forumdisplay) {
$templater = vB_Template::create('your_template');
$template_hook['navbar_end'] .= $templater->render();
}
Make a new template add your stuff to that template and change your_template(in the above code) with the name of the template you just created.
pokash
11-30-2009, 07:05 PM
Make a new plugin and add something like this. The hook location for the plugin should be forumdisplay_start.
if (THIS_SCRIPT == forumdisplay) {
$templater = vB_Template::create('your_template');
$template_hook['navbar_end'] .= $templater->render();
}
Make a new template add your stuff to that template and change your_template(in the above code) with the name of the template you just created.
But how do I have it appear above a specific list of sub-forums? Not above all.
BBR-APBT
11-30-2009, 07:28 PM
But how do I have it appear above a specific list of sub-forums? Not above all.
Go to your navbar template and add the following at the very end or where ever you want it to show.
{vb:raw template_hook.below_navbar}
Plugin Code
if (THIS_SCRIPT == forumdisplay) {
$BBRForumIDs = array(5,7,13);
if(in_array($vbulletin->GPC['forumid'], $BBRForumIDs))
{
$templater = vB_Template::create('your_template');
$template_hook['below_navbar'] .= $templater->render();
}
}
Make a new template add your stuff to that template and change your_template(in the above code) with the name of the template you just created.
Don't forget to edit your forum id's you want it to show in.
Let me know how it works.
pokash
11-30-2009, 09:32 PM
I got it working!
Lynne
11-30-2009, 09:40 PM
You are missing an apostrophe in this line. It should be:
$templater = vB_Template::create('contest');
pokash
11-30-2009, 09:47 PM
I got it working now. Thank you guys!
We're getting there:
How do I point the index page to a certain part of the forum? Or else I need to put specific content on the index.php page.
Can I remove the text:'forum:' under the 'post new thread' button?
Can I change the title: sub-forums?
pokash
12-06-2009, 11:35 PM
Lynne and BBR,
I posted a few more questions in my last post which I haven't been able resolve yet. Could you please have a look?
Right now I have the homepage showing one part of the forum, and have got two tabs linking to the other parts of the forum. But the tabs don't highlight, is there an easy way to have them highlight?
Lynne
12-07-2009, 03:11 AM
What do you mean point the index page to a certain part of the forum? You don't want your regular index page with the list of all the forums?
For the text "forum:" Look in the FORUMDISPLAY template for this line and modify how you want:
<h1>{vb:rawphrase forum}: <span class="forumtitle">{vb:raw foruminfo.title}</span></h1>
And sub-forums is probably just a phrase also, so do a Search in Phrases for it.
As for your tabs not highlighting, you probably need to put a condition around them to define when they should be highlighted otherwise how are they supposed to know they are supposed to be highlighted?
pokash
12-07-2009, 05:51 PM
well right now I only have 1 categorie of the forums showing on the home page, but I can't (or don't know how) assign a forum id in the code that BBR gave me so that specific content shows up on the home above this categorie of the forums, on the home page.
I'm using the mod from elmer to create these tabs and I don't think it's easy for me to give the tabs this condition, so I'll wait for this feature to be added to this mod.
Thanks
pokash
12-11-2009, 11:44 PM
Bump:)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.