Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-13-2003, 06:31 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you tried the above code yet?
Reply With Quote
  #12  
Old 04-14-2003, 02:26 PM
ga.net ga.net is offline
 
Join Date: Jan 2003
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not yet! sorry
Reply With Quote
  #13  
Old 04-17-2003, 06:43 AM
ga.net ga.net is offline
 
Join Date: Jan 2003
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #14  
Old 04-17-2003, 06:55 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 04-17-2003, 07:07 AM
ga.net ga.net is offline
 
Join Date: Jan 2003
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shouldnt it be newthread instead of newreply???
Reply With Quote
  #16  
Old 04-17-2003, 07:12 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops... yes, it's the same instructions, same code.
Reply With Quote
  #17  
Old 04-17-2003, 07:15 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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);
}
Reply With Quote
  #18  
Old 04-17-2003, 07:42 AM
ga.net ga.net is offline
 
Join Date: Jan 2003
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im getting a parse error
Reply With Quote
  #19  
Old 04-17-2003, 07:45 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 04-17-2003, 07:52 AM
ga.net ga.net is offline
 
Join Date: Jan 2003
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07370 seconds
  • Memory Usage 2,263KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete