Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

error making dice plugin
#1

Okay, the template edits... I hate template edits xD

I get an error while activating the plugin + it erases the whole template (it's there but is blank)

PHP Code:
    find_replace_templatesets("newreply"'<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked[\'signature\']} /> {$lang->options_sig}</label>''{$dice}<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked[\'signature\']} /> {$lang->options_sig}</label>'); 

Thanks,
- Shadows.

edit: I included the file for it..


The error:
Warning [2] preg_replace() [function.preg-replace]: Unknown modifier '<' - Line: 30 - File: C:\xampp\htdocs\mybb\inc\adminfunctions_templates.php PHP 5.2.9 (WINNT)File Line Function
[PHP] errorHandler->error
C:\xampp\htdocs\mybb\inc\adminfunctions_templates.php 30 preg_replace
C:\xampp\htdocs\mybb\inc\plugins\diceroll.php 68 find_replace_templatesets
[PHP] diceroll_activate
C:\xampp\htdocs\mybb\admin\modules\config\plugins.php 208 call_user_func
C:\xampp\htdocs\mybb\admin\index.php 380 require
#2

replace the second parameter with:
PHP Code:
'#'.preg_quote('<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked[\'signature\']} /> {$lang->options_sig}</label>').'#' 
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#3

Ok, thanks got it to work. Now i'm getting another error ugh lol.

Fatal error: Call to a member function update_query() on a non-object in C:\xampp\htdocs\mybb\inc\plugins\diceroll.php on line 114

$rolldice = array(
"rolldice" => $rolled, //$rolled is the nr on the dice & rolldice = the mysql col..
);

$db->update_query("posts", $rolldice, "pid='{$pid}'");


you got any idea?
i globalled all the ones i needed to
#4

global $db
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#5

ok that was stupid lol
#6

lol yeap
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.




Users browsing this thread: 1 Guest(s)