vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   coloring title ! (https://vborg.vbsupport.ru/showthread.php?t=44187)

Trident 10-02-2002 03:34 AM

coloring title !
 
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:
PHP Code:

      $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,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:
PHP Code:

      $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(iif($bbuserinfo[usergroupid]==or $bbuserinfo[usergroupid]==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

1 Attachment(s)
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
PHP Code:

      $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1')"); 

and change it to:
PHP Code:

      $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(iif($bbuserinfo[usergroupid]==or $bbuserinfo[usergroupid]==or $bbuserinfo[usergroupid]==7,$subject,htmlspecialchars($subject)))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','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

1 Attachment(s)
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 !!

Code:

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

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

Trident 10-03-2002 02:01 AM

1 Attachment(s)
pic No2

and thanks for help me .

Trident 10-03-2002 03:03 AM

1 Attachment(s)
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


All times are GMT. The time now is 04:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01175 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete