vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Must Read Page >> Before Posting New Thread In Forum 1.01 (https://vborg.vbsupport.ru/showthread.php?t=50238)

N9ne 05-22-2003 04:57 PM

Hmm, that's odd, see, in newthread.php you put this code from this hack:

PHP Code:

// ############################### start new thread ###############################
if ($action=="newthread" and $foruminfo[mustread]=="1" and !$previewpost and !$preview) {
        
$mustreadtext addslashes($foruminfo[mustreadtext]);
        eval(
"dooutput(\"".gettemplate("newthread_mustread")."\");");
        exit;
} elseif ((
$HTTP_POST_VARS['action']=="postnewthread" and $foruminfo[mustread]=="1") or ($action=="newthread" and $foruminfo[mustread]=="0") or ($previewpost)) { 

It already has an addslashes there, so I don't know why it's doing this...

I'm out of ideas, maybe I'll think of something later. Right now I can't do anything as I have some huge exams to take, this whole week actually [some may have noticed my absence at vb.org], I've only got my last 2 tomorrow and then I will be back :D

Smoothie 05-22-2003 08:01 PM

N9ne-

yep, noticed this little bug a few weeks ago and forgot to mention it here. Hopefully there will a fix upcoming when you have time.

DelFDgfd_gT 05-23-2003 01:19 AM

I have a little request. Instead of making this work in a certain forum, how can it be done when visiting the index.php?

Basically, when you visit my site, you get the MUST READ page, you click Proceed, and you can view the forums.

Also, I'd like it so that you only have to click it ONE time...

If the index.php must read is too much for you, can you tell me two things...
1. how to enable it in newreply.php
2. only click proceed once. (cookies)

Boofo 05-23-2003 01:48 AM

Quote:

Today at 12:57 PM N9ne said this in Post #61
Hmm, that's odd, see, in newthread.php you put this code from this hack:

PHP Code:

// ############################### start new thread ###############################
if ($action=="newthread" and $foruminfo[mustread]=="1" and !$previewpost and !$preview) {
        
$mustreadtext addslashes($foruminfo[mustreadtext]);
        eval(
"dooutput(\"".gettemplate("newthread_mustread")."\");");
        exit;
} elseif ((
$HTTP_POST_VARS['action']=="postnewthread" and $foruminfo[mustread]=="1") or ($action=="newthread" and $foruminfo[mustread]=="0") or ($previewpost)) { 

It already has an addslashes there, so I don't know why it's doing this...

I'm out of ideas, maybe I'll think of something later. Right now I can't do anything as I have some huge exams to take, this whole week actually [some may have noticed my absence at vb.org], I've only got my last 2 tomorrow and then I will be back :D

You are adding slashes as you pull it from the db. You need to add slashes when you add it to the db in the query.

Boofo 05-23-2003 01:54 AM

Smoothie, try changing this:

PHP Code:

mustreadtext='$mustreadtext' 

to this in the forum.php:

PHP Code:

mustreadtext='".addslashes($mustreadtext)."' 

and let me know what happens. Also take this code out from the code above before you test this.

PHP Code:

$mustreadtext addslashes($foruminfo[mustreadtext]); 


Smoothie 05-23-2003 03:11 AM

Quote:

Yesterday at 10:54 PM Boofo said this in Post #65
Smoothie, try changing this:

PHP Code:

mustreadtext='$mustreadtext' 

to this in the forum.php:

PHP Code:

mustreadtext='".addslashes($mustreadtext)."' 

and let me know what happens. Also take this code out from the code above before you test this.

PHP Code:

$mustreadtext addslashes($foruminfo[mustreadtext]); 


If I use your code, I can add a must read in the admin cp for a forum that has a ' character. But when i click on new thread, the must read contains no text. If I change only the first code in forum.php, it works, but I get this: haven/t instead of haven't.

Boofo 05-23-2003 09:25 AM

Try changing this:

PHP Code:

$mustreadtext addslashes($foruminfo[mustreadtext]); 

to this:

PHP Code:

$mustreadtext $foruminfo[mustreadtext]; 


DelFDgfd_gT 05-25-2003 07:14 AM

can u make it for newreply.php too?

Boofo 05-25-2003 07:17 AM

Quote:

05-23-03 at 05:25 AM Boofo said this in Post #67
Try changing this:

PHP Code:

$mustreadtext addslashes($foruminfo[mustreadtext]); 

to this:

PHP Code:

$mustreadtext $foruminfo[mustreadtext]; 


Smoothie, did this work for you?

Smoothie 05-25-2003 03:36 PM

Quote:

Today at 04:17 AM Boofo said this in Post #69
Smoothie, did this work for you?
Haven't tried it yet


All times are GMT. The time now is 06:34 AM.

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.01121 seconds
  • Memory Usage 1,765KB
  • 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
  • (12)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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