PDA

View Full Version : Threa title on the top of the page


midad
04-14-2002, 01:38 PM
Hey there...
I've noticed in this forum when open any threa, you find on the top of the page the name of the thread in a larg font. And this is very cute :classic:

How can I do such thing???

thank you in advance

Logician
04-15-2002, 09:14 AM
you dont need a hack.. it's a simple template modification.. Modify your relevant template and put your thread title between

<font size="5"><b>Titlevariable</b></font>

tags..
:)

midad
04-15-2002, 10:55 AM
Thank you Logician so much...
I did what you told me, unfortunatily, I couldn't get rid of the forums name as well as other extensions. So, How can I get rid of those and just make the thread title there???
I have found that variable in navbar template. So, any help in that??? :)

Logician
04-16-2002, 07:16 PM
sorry my bad. I think it requires hacking. Anyway here you go:

1- Edit your showthread.php and find:
-- cut --
$threadid = intval($threadid);
$thread = verifyid("thread",$threadid,1,1);
-- cut --

After that add:
-- cut --
$logtitle=$thread['title'];
-- cut --

2- Edit template "showthread", find:
-- cut --
<!-- breadcrumb, nav links -->
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>$navbar</td>
$ratingdisplay
</tr>
</table>
-- cut--

After that add:
-- cut--
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td><h2><div align="center">$logtitle</div><h2></td>
</tr></table>
-- cut ---
(Alternative: replace "$navbar" with "$logtitle")

That's it.. Enjoy.. ;)

midad
04-17-2002, 02:15 PM
Sorry LogicianI tried this but nothing happened :(
I did everything you told me but when I go to any thread it shows nothing on the top. Just the table when I make the border = 1
Maybe you forgot to mention something. I'm sure you did it and I DO appreciate your help to me, but would you mind helping me a little more :)

Logician
04-17-2002, 03:16 PM
Originally posted by midad
Sorry LogicianI tried this but nothing happened :(
I did everything you told me but when I go to any thread it shows nothing on the top. Just the table when I make the border = 1
Maybe you forgot to mention something. I'm sure you did it and I DO appreciate your help to me, but would you mind helping me a little more :)
I think I figured out why: Because there are 2
$threadid = intval($threadid);
$thread = verifyid("thread",$threadid,1,1);
lines in showthread.php ;)

Add the line BEFORE:
if ($wordwrap!=0) {
line..

This should work.. This hack is tested and sure it's running! :D

Neo
04-17-2002, 03:25 PM
This does not require a single line of hacking logician

midad just use this. place it in your showthread template whereever you want it to show up.


<font size="5"><b>$thread[title]</b></font>

Logician
04-17-2002, 03:29 PM
Originally posted by neo
This does not require a single line of hacking logician

midad just use this. place it in your showthread template whereever you want it to show up.


<font size="5"><b>$thread[title]</b></font>

Neo I thought this too.. This is why I wrote it's just a template change in my first reply..

But this is not working..

It gives an error and I think it's because "eval" command does not like "$thread[title]" array, dont know..

Anyway hack is working for sure.. :)

Neo
04-17-2002, 03:31 PM
This is not a hack and it will work perfectly with all versions :) Like mine, this sites and so on.

Twig Deez
04-17-2002, 06:30 PM
i've had this working on my forums for a few months now,
just with the template change that neo indicated. so. yeah!

midad
04-17-2002, 08:08 PM
WAAAAAAAAAAAAAAAAAHOOOOOOOOOO it's working fine with me now. Thanx for you all everyone thanx. :)
Have a nice day...;)