PDA

View Full Version : coloring title !


Trident
10-02-2002, 03:34 AM
hi,

i want coloring part of the title of some threads in thread list .. like this :

break news ! .......................etc !

like " Prefix for Sticky threads " but just i want can use HTML in the subject field .. and can admin , mods only use it .

can any one make this hack ?

sory for bad english ,

thanks,

Xenon
10-02-2002, 09:14 AM
hmm, try that:
open newthread.php find this:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,dateline,iconid, visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");

and change it to this:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,dateline,iconid, visible,attach) VALUES (NULL,'".addslashes(iif($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6 or $bbuserinfo[usergroupid]==7,$subject,htmlspecialchars($subject)))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");

so admins, mods and supermods should be able to post html in titles

Trident
10-02-2002, 12:12 PM
great work Xenon :)

it is good for forumdisply and showthread , but in top of postbit not work !

see screenshote for you and for any one want this hack .. and thanks again . :)

Xenon
10-02-2002, 12:49 PM
yes right, i just thought of the thread title ;)

open newthread.php again
find $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','1')");

and change it to:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(iif($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6 or $bbuserinfo[usergroupid]==7,$subject,htmlspecialchars($subject)))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','1')");

then it'll also convert the postbit :)

Trident
10-02-2002, 01:44 PM
GREAT ! :banana:

thank you alot Xenon

:)

Xenon
10-02-2002, 01:45 PM
:)

you're welcome

Trident
10-03-2002, 02:00 AM
sory Xwnon

i have some problem !

whene i want to edit the thread ( from normal edit or admin option ) .. the code of HTML not work !

i tried to use ( " ) and ( ' ) in html tag .. but not working !!

<font color="red">break news</font> news ..~!

<font color='red'>break news</font> news ..~!

see pic No1

Trident
10-03-2002, 02:01 AM
pic No2

and thanks for help me .

Trident
10-03-2002, 03:03 AM
sory :(
old problem !

before new problem and after ..

in the browser title the thread title showing html tag !


thanks,

screenshoot

Xenon
10-03-2002, 03:53 PM
the last problem you cannot change, browsers aren't able to show html code parsed in titles....

the other problems:
you have to add those changes also in editpost.php

and also in editpost
find this:
$postinfo[title]=$threadinfo[title];

change it to:
$postinfo[title]=iif($bbuserinfo[usergroupid]==6,htmlspecialchars($threadinfo[title]),$threadinfo[title]);

then it should work

Trident
10-03-2002, 08:18 PM
thanks xenon ,

i tried to edit old thread and write new thread and edit it .. but they are not worked :(

thank you for help me .

Xenon
10-03-2002, 10:13 PM
have you tried to edit a threadtitle through edit first post or with adminfunctions editthread?

for adminfuctions you have to open postsing.php

find:
$notes = "Thread edited by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $notes";
$DB_site->query("UPDATE thread SET visible='$visible',open='$open',title='".addslashes(htmlspecialchars($title))."',iconid='".addslashes($iconid)."',notes='".addslashes($notes)."' WHERE threadid='$threadid'");

and change it to:
$notes = "Thread edited by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $notes";
$DB_site->query("UPDATE thread SET visible='$visible',open='$open',title='".addslashes(iif($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6 or $bbuserinfo[usergroupid]==7,$title,htmlspecialchars($title)))."',iconid='".addslashes($iconid)."',notes='".addslashes($notes)."' WHERE threadid='$threadid'");

Trident
10-04-2002, 12:10 AM
not worked !

have you tried to edit a threadtitle through edit first post or with adminfunctions editthread?

yes .

** i want to (edit) the post .. (not title) .. i dont need use adminfunctions .

i'm tried all the ways .. but not benefit :(

ok xenon .. thanks for gived me your time :)

Xenon
10-04-2002, 08:59 AM
hmm, no other ideas available

normally it should work....

Trident
10-05-2002, 12:52 PM
nevermind :)

whatever .. many thanks :)