Hello There, Guest! › Register

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

Random display
#11

(05-21-2014, 09:40 PM)Pirata Nervo Wrote: You also have them here:
http://forums.mybb-plugins.net/Thread-My...-Explained

I plan on finishing them yes but probably not within the next 30 days. I'm very very very busy and I prefer to spend my time developing MyBB rather than creating these tutorials (though they're definitely helpful IMO for new plugin developers, I believe they can wait 30 days Tongue)

30 days..... not if I can help itBig Grin
Reply
#12

Oh boy....
* Diogo Parrinha runs
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#13

(05-24-2014, 06:19 AM)Pirata Nervo Wrote: Oh boy....
* Pirata Nervo runs

You can't out run the internet Angel
Reply
#14

Pirata Nervo says:







Though seriously now, I know you've got more pressing matter to attend to. (MyBB development takes precedence along with plugin development. And of course real life issues too.)
Reply
#15

haha, that made me laugh. Yeah within a few weeks I'll be less busy!
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#16

Looks like I may need some help with this plugin again.

I've made a fair bit of progress on things, though now it's only throwing this error:

Code:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in mod_dev\index.php(400) : eval()'d code on line 29

When before it worked perfectly fine. I have no idea why it's pitching this error now. I'm not even sure where exactly in the code is causing problems because for me line 400 is:
Code:
$form = new Form("index.php?module=forum-randomplot&action=do_editplot", "post", "randomplot");

And line 29 is where I set the website url for the plugin info.

Here's the updated version of the plugin so you can have a look at the code.
[attachment=1172]
Reply
#17

The error is in mod_dev/index.php (line 400) - have you checked it?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#18

Line 400 of index.php is
Code:
eval("\$index = \"".$templates->get("index")."\";");

and around line 29 is:
Code:
$plugins->run_hooks("index_start");

// Load global language phrases
$lang->load("index");

$logoutlink = $loginform = '';

if($mybb->user['uid'] != 0) {
eval("\$logoutlink = \"".$templates->get("index_logoutlink")."\";");
} else {
//Checks to make sure the user can login; they haven't had too many tries at logging in.

//Function call is not fatal

if(login_attempt_check(false) !== false) {
switch($mybb->settings['username_method']) {

case 0:
$login_username = $lang->login_username;
break;

case 1:
$login_username = $lang->login_username1;
break;

case 2:
$login_username = $lang->login_username2;
break;

default:
$login_username = $lang->login_username;
break;
}

eval("\$loginform = \"".$templates->get("index_loginform")."\";");
}

}

But I'm not sure that this issue is there. I mean I haven't modified anything in the core mybb files. And I've only really made changes to this plugin.

And the index and plugin's front end function both worked at first (when I had the ACP stuff incorrectly set up. I had a section of code that should have been in randomplot_admin, outside of it... which was creating errors for the backend stuff. But the front end worked fine.)

Though I have no idea what's going on now because the issue is happening even if the plugin is disabled (by setting the global plugin disable in phpmyadmin and by renaming the plugin...)
Reply
#19

The problem then is the 'index' template Smile (line 29)
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#20

On the index template, around line 29 I had:
Code:
<?php
global $mybb, $db;
$query = $db->simple_select('rndm_plot', '*', 'disabled=0', array('order_by' => 'RAND()', 'limit' => 1));
$plot = $db->fetch_array($query);
$page =  $plot['theplot'];
echo $page;

?>

Testing the base function.

After I removed that I was able to log in and stay logged in without the issue affecting me. (So it was likely what was affecting this... Though I'm not sure why it would cause an issue now, it wasn't causing problems before.)

And the plugin showed up as functioning.

But now there's a new issue... (well, it was happening before while I was developing the ACP stuff but I figured it was just because the ACP code wasn't done yet.)
Basically it drops me back to this screen when I try to click on the random plot link in the ACP.

I haven't made any adjustments to the plugin, given above, so whatever's causing this issue is in there. But I'm not sure where/what's causing it.
Reply




Users browsing this thread: 1 Guest(s)