vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   NO images in Post New thread (https://vborg.vbsupport.ru/showthread.php?t=51302)

Boofo 04-13-2003 05:31 PM

Have you tried the above code yet?

ga.net 04-14-2003 01:26 PM

Not yet! sorry :)

ga.net 04-17-2003 05:43 AM

I got this error

Parse error: parse error in /www/greenarcher.net/html/forums/admin/functions.php on line 128

Fatal error: Call to undefined function: getuserinfo() in /www/greenarcher.net/html/forums/admin/sessions.php on line 112

Erwin 04-17-2003 05:55 AM

Not perfect, but will work.

Open newthread.php, find:

PHP Code:

    // check max images
    
if ($maximages!=0) {
      
$parsedmessage=bbcodeparse($message,$forumid,$allowsmilie);
      if (
countchar($parsedmessage,"<img")>$maximages) {
        eval(
"standarderror(\"".gettemplate("error_toomanyimages")."\");");
        exit;
      }
    } 

Below, add:

PHP Code:

    if(strstr($message,'[img]')) {
      eval(
"standarderror(\"".gettemplate("error_noimagesnewreply")."\");");
      exit;
    }
    if(
strstr($message,'[IMG]')) {
      eval(
"standarderror(\"".gettemplate("error_noimagesnewreply")."\");");
      exit;
    } 

Then, ADD a template called "error_noimagesnewreply" with this content:

Code:

You cannot use the [img] code with a new thread!
That would work.

ga.net 04-17-2003 06:07 AM

Shouldnt it be newthread instead of newreply???

Erwin 04-17-2003 06:12 AM

Oops... yes, it's the same instructions, same code. :)

Boofo 04-17-2003 06:15 AM

Quote:

Today at 02:12 AM Erwin said this in Post #16
Oops... yes, it's the same instructions, same code. :)
I'm just curious...why didn't this work?

if($newthread) {
$text = preg_replace("/IMG/i", "", $text);
$text = preg_replace("/img/i", "", $text);
}

ga.net 04-17-2003 06:42 AM

Im getting a parse error

Erwin 04-17-2003 06:45 AM

The instructions I gave you are so basic they are error-free.

Redo the hack again from scratch.

Post the parse error, and the 10 lines before and after of the code that the parse error specifies.

If you still get errors, then there something wrong with the way you are doing it - make sure you use Notepad, not Wordpad, and you're not mucking up the formatting.

@ Boofo - not sure what's wrong with your code, looks fine to me.

ga.net 04-17-2003 06:52 AM

Here's the error:

Parse error: parse error in /www/greenarcher.net/html/forums/newthread.php on line 198

Here is part of the code

// check max images
if ($maximages!=0) {
$parsedmessage=bbcodeparse($message,$foruminfo[forumid],$allowsmilie);
if (countchar($parsedmessage,"<img")>$maximages) {
eval("standarderror(\"".gettemplate("error_toomany images")."\");");
exit;
}
}
if($message,'[img]')) {
eval("standarderror(\"".gettemplate("error_noimage snewreply")."\");");
exit;
}
if($message,'[IMG]')) {
eval("standarderror(\"".gettemplate("error_noimage snewreply")."\");");
exit;
}


All times are GMT. The time now is 11:25 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.01747 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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