PDA

View Full Version : Where is this option...


Shon
Thu 30th Aug '07, 12:18am
In the BLOG template it has this option: $show['titlefirst']

I can't seem to find that option in the Blog settings, should I be looking somewhere else?

PitchouneN64ngc
Thu 30th Aug '07, 4:47am
Line 767 of ./blog.php :)

Shon
Thu 30th Aug '07, 5:19am
Thank you for your input! :)

However, I don't expect everybody will want to modify the file when the templates obviously rely on an "option."

I don't have a problem simply modifying the templates, but I don't believe editing PHP code to change a template option is the best way to have customers customize that option. ;)

Shon
Thu 30th Aug '07, 11:10pm
I don't have a problem simply modifying the templates, but I don't believe editing PHP code to change a template option is the best way to have customers customize that option. ;)I guess I'll have to go that route then. Once again, thanks for your help PitchouneN64ngc. :)

Freddie Bingham
Fri 31st Aug '07, 2:08am
If you want to customize that option, just edit the template, you don't need to alter the source code to change the way the title is built.

Shon
Fri 31st Aug '07, 2:29am
There is an option in the template "BLOGS" for that. Something along the lines of the following, since I've already removed it (I believe this is the correct code, although I recreated it):<if condition="$show['titlefirst']">
<title>$pagetitle - $vboptions[bbtitle]</title>
<else />
<title>$vboptions[bbtitle] - $pagetitle</title>
</if>I can't find an option to change the value of "$show['titlefirst']" anywhere. Is there a reason for that option to be there? And if so, I can't find a setting to change it, can you point me in the right direction?

Freddie Bingham
Fri 31st Aug '07, 2:35am
It is there because I wanted the $pagetitle to be first when viewing an entry. Otherwise the name of the forum comes first. If you always want the forum title first then remove that condition and just use <title>$vboptions[bbtitle] - $pagetitle</title>It follows the same convention as threads, where the thread title comes first when viewing threads.

Shon
Fri 31st Aug '07, 7:36am
That's exactly what I did... however, the thread titles are not displayed by a hard-coded option that can't be changed and the blog homepage is not a thread or the forumhome page. The HTML for the title of a thread is as followed: <title>$thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>Personally, it doesn't matter to me, because I've already changed it to what I want it to be. I just don't see the need in the option being there if it's not able to be changed.

Freddie Bingham
Fri 31st Aug '07, 2:27pm
The <title> attribute for threads appears in one template - SHOWTHREAD - so it does not need a conditional to control its display. The blog's entry <title> attribute is contained within the BLOG template, which is a wrapper for all of the blog templates, so it needs a conditional to activate it when an entry is being displayed. They are effectively the same and this isn't an option, it is a conditional. There is nothing hardcoded here. If you want to change the order of a thread title, you edit SHOWTHREAD -> <title>, if you want to edit the order of a blog entry title, you edit BLOG -> <condition="$show['titlefirst']> -> <title>.

I could rename "$show['titlefirst']" to "$show['this_is_a_blog_entry_page']", it would be doing the same thing. You are getting hung up on what I used to name the conditional.

Shon
Sat 1st Sep '07, 12:13am
Ok, I understand now. However, I wanted the blog.php page's title to show the same way as blog entry titles, so I just removed the conditional.

Thank you! :)