MyBB Community Forums

Full Version: MyPlaza v0.5 (Beta)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It doesn't work.
Soshite Wrote:Just to check, is this the same code as the version you sent me via PM?
There are some slight minor modifications, but largely, it's the same Toungue

DragonLord Wrote:When I try to unpack the file I got this errors, but the files are still there is it save to still continue my installation

!   Upload\inc\languages\english\admin: The file "Upload\inc\languages\english\admin" header is corrupt
!   Upload\inc\languages\english: The file "Upload\inc\languages\english" header is corrupt
!   Upload\images\myplaza\inventory: The file "Upload\images\myplaza\inventory" header is corrupt
!   Upload\inc\plugins\myplaza: The file "Upload\inc\plugins\myplaza" header is corrupt
!   Upload\inc\languages: The file "Upload\inc\languages" header is corrupt
!   Upload\images\myplaza: The file "Upload\images\myplaza" header is corrupt
!   Upload\inc\myplaza: The file "Upload\inc\myplaza" header is corrupt
!   Upload\inc\plugins: The file "Upload\inc\plugins" header is corrupt
!   Upload\admin: The file "Upload\admin" header is corrupt
!   Upload\images: The file "Upload\images" header is corrupt
!   Upload\inc: The file "Upload\inc" header is corrupt
!   Upload\jscripts: The file "Upload\jscripts" header is corrupt
!   MPUmaker\source: The file "MPUmaker\source" header is corrupt
!   Documentation: The file "Documentation" header is corrupt
!   MPUmaker: The file "MPUmaker" header is corrupt
!   Upload: The file "Upload" header is corrupt
Sounds like the entire archive got corrupt on you. Try re-downloading it.

Plucko Wrote:I absolutely love this plugin. It has so many features!!! And I can't wait to see more featuers and modules!

Anyway, I have a question.

Is there a way to make the amount of forum points/money you have show up in the postbit?

And I also think there's supposed to be a Donate button somewhere but I am unable to find it. Is it supposed to show up in the postbit?? Or do I need to alter the code in some way to make it show up there?

Thanks in advance.
Plucko Wrote:Sorry, I'm not quite sure what you mean?

I have another problem. When I visit the Shop page (plaza.php) and select an item, for example "Change Default Post Colour", nothing happens. I assume more details about that item should show up on the right, where it says "Click an item on the left to see details." but it doesn't, UNLESS I right-click "Change Default Post Colour" and open it in a new window. But when I click such link on the MyPlaza page nothing happens.
Hi Plucko,
It sounds like all these issues you're having are related to templates. It's possible that a custom theme is causing things not to show up properly.
It's best to try and deactivate, and then reactivate MyPlaza - this will cause all templates to be refreshed (though, with some custom themes, replacements may not work properly).
Note that template issues are not only a problem with MyPlaza - it's an issue across all MyBB plugins.
I redownload it I still get the same errors Confused
Odd - possibly an issue with your archiver not extracting correctly...
Try downloading v0.51 in ZIP format: http://mybbhacks.zingaburga.com/attachment.php?aid=9
See if that helps.



I've done a minor update to v0.51.

I typically do testing on localhost, and v0.5's new dynamic code loading system works quite well, and runs a lot faster than v0.43. However, it seems that on my server, v0.5 actually ran slower than v0.43. I can only really attribute this to the PHP accelerator, perhaps not liking certain parts.
Dunno, not sure, but I've updated to v0.51, which seems to amend the issue.
Also, I've found out that some servers won't, oddly, generate a request time value. If your bank isn't updating correctly (ie depositing doesn't update the amount of money in the bank), v0.51 may fix it (I've coded a work around).

Upgrading from v0.5 - upgrading will require no update scripts - the changes are in the code only.

For anyone interested, I ran some comparison tests, for speed. I set up 4 identical boards, and recorded the information from the debug page at the same time, for each board (for benchmarking purposes, I've compared it to MyBB by itself, and MYPS as well).
This test was done on showthread.php with 10 posts (probably the type of page which is accessed the most on any normal board). The test was repeated 3 times, and averages were taken. Here's the results summary:
[Image: clipboard03cu6.jpg]
I can provide further details on the tests if anyone is interested.
ZiNga BuRgA Wrote:
Plucko Wrote:Sorry, I'm not quite sure what you mean?

I have another problem. When I visit the Shop page (plaza.php) and select an item, for example "Change Default Post Colour", nothing happens. I assume more details about that item should show up on the right, where it says "Click an item on the left to see details." but it doesn't, UNLESS I right-click "Change Default Post Colour" and open it in a new window. But when I click such link on the MyPlaza page nothing happens.
Hi Plucko,
It sounds like all these issues you're having are related to templates. It's possible that a custom theme is causing things not to show up properly.
It's best to try and deactivate, and then reactivate MyPlaza - this will cause all templates to be refreshed (though, with some custom themes, replacements may not work properly).
Note that template issues are not only a problem with MyPlaza - it's an issue across all MyBB plugins.

I do not have any custom templates. I'm using the myBB default theme.

But anyway, reactivating the plugin works. I can't believe I hadn't thought about that before (I even tried to reactivate the modules, lol). Thanks very much for your help! Big Grin

And keep up the great work with this wonderful plugin.
ZiNga BuRgA Wrote:For anyone interested, I ran some comparison tests, for speed. I set up 4 identical boards, and recorded the information from the debug page at the same time, for each board (for benchmarking purposes, I've compared it to MyBB by itself, and MYPS as well).
This test was done on showthread.php with 10 posts (probably the type of page which is accessed the most on any normal board). The test was repeated 3 times, and averages were taken. Here's the results summary:

MYPS 1.23 (unreleased) is optimized to have those queries removed. As a matter of fact for showthread there isn't one extra query even made. It will benchmark faster than MyPlaza guaranteed. I also see that the average PHP and average Global are a LOT less than myplaza. So once those queries are fixed it will benchmark better across the board. Thanks for pointing that out to everyone it's appreciated. Good to know that MYPS goes head to head against your myplaza for resources.

Old function

function myps_display(&$post)
{
      global $mybb, $db, $lang, $plugins, $templates;

    $plugins->run_hooks("myps_display_start");

    $language = $mybb->settings['bblanguage'];
    $lang->load("myps");
    $lang->set_language($mybb->settings['bblanguage']);

if ($mybb->settings['myps_status'] != "off" && $post['uid'] != 0){

    $result = $db->query("SELECT * FROM `".TABLE_PREFIX."users` WHERE uid='".$post['uid']."'");
    $show = $db->fetch_array($result);
    $myps = round($show['myps'],$mybb->settings['myps_decimal']);
    $post['mypsdisplay'] = $mybb->settings['myps_name'].": <a href=\"myps.php?action=donate&username=". $post['username']. "\">$myps</a>";

  if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin') {
    $post['mypsdisplay'] .= "(<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
    }

  if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods')) {
    $post['mypsdisplay'] .= "(<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
    }

  if((is_moderator($fid) == "yes") && ($mybb->settings['myps_allowmod'] == 'mypspermall')) {
    $post['mypsdisplay'] .= "(<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
    }

  }

    $plugins->run_hooks("myps_display_end");

}

New function
function myps_display(&$post)
{
      global $mybb, $db, $lang, $plugins, $templates;

    $plugins->run_hooks("myps_display_start");

    $language = $mybb->settings['bblanguage'];
    $lang->load("myps");
    $lang->set_language($mybb->settings['bblanguage']);

if ($mybb->settings['myps_status'] != "off" && $post['uid'] != 0){

    $myps = round($post['myps'],$mybb->settings['myps_decimal']);
    $post['mypsdisplay'] = $mybb->settings['myps_name'].": <a href=\"myps.php?action=donate&username=". $post['username']. "\">$myps</a>";

  if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin') {
    $post['mypsdisplay'] .= "(<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
    }

  if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods')) {
    $post['mypsdisplay'] .= "(<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
    }

  if((is_moderator($fid) == "yes") && ($mybb->settings['myps_allowmod'] == 'mypspermall')) {
    $post['mypsdisplay'] .= "(<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
    }

  }

    $plugins->run_hooks("myps_display_end");

}

Myplaza has obviously kept me on my toes. When I started MYPS optimizing wasn't a problem...getting everything to function was and working properly. Now I will work on making the code faster, smaller, and more secure. However MYPS is fairly complete and upgrades are painless.

Thanks Zinga you are great guy for pointing all that out.
Hey Zinga you're plug-in is awesome....I have a problem tho, for some reason when I try to reply to a post or try to post a thread it takes about 30 seconds to do so. Is this normal? Or is there something I didn't do rite. The problem sees to solve itself if I de-activate the Income Module, but then that defeats the whole purpose of the plug-in.

Do you have any suggestions for me?
Alright, I'm having two problems.

1) The name of the currency is not appearing on the postbit section. The only thing I see is:

: 10 [Donate]

Before the : it should say "Money" which is the name of my currency.

My second problem is that when I activate the bank module I get this error on plaza.php:

Warning: Division by zero in /inc/plugins/myplaza/bank.php on line 383

MyBB version: 1.2.11
MyPlaza version: 0.51
PHP version: 4.4.7
MySQL version: 4.1.22

Any help appreciated. Thanks
@labrocca: Hi, I'm glad to see you are still working on your plugin. It'd be great to see it operate faster.
MyPlaza and MYPS were benchmarked with default settings, and MyPlaza is at somewhat a disadvantage since:
a) By default, it pays for thread views
b) The donate link is stored in a template, so that an extra query needs to be performed to fetch the template (it's impossible to cache it beforehand). I use a template so that it can be dynamically evaluated - ie, the donate link will not show up for yourself, or won't show up to guests or for guests

Actually, the average PHP and global for MyPlaza are less than MYPS. Don't be fooled by the percentages. MYPS has a lower percentage because it's using a high percentage for MySQL.
I'd be interested to see your next version!

thebloodlineclan Wrote:Hey Zinga you're plug-in is awesome....I have a problem tho, for some reason when I try to reply to a post or try to post a thread it takes about 30 seconds to do so. Is this normal? Or is there something I didn't do rite. The problem sees to solve itself if I de-activate the Income Module, but then that defeats the whole purpose of the plug-in.

Do you have any suggestions for me?
The only possibility I can think of if you are posting a gigantic post.
You can try disabling bonus income for characters, but taking 30 seconds, when other parts of your board don't slow down is nigh impossible, and no such issue has ever been reported.
If the problem still persists after my suggestion, you could PM me details of your FTP and I'll see if I can figure it out for you.

DCR Wrote:Alright, I'm having two problems.

1) The name of the currency is not appearing on the postbit section. The only thing I see is:

: 10 [Donate]

Before the : it should say "Money" which is the name of my currency.

My second problem is that when I activate the bank module I get this error on plaza.php:

Warning: Division by zero in /inc/plugins/myplaza/bank.php on line 383

MyBB version: 1.2.11
MyPlaza version: 0.51
PHP version: 4.4.7
MySQL version: 4.1.22

Any help appreciated. Thanks

For your first problem, I'm suspecting an issue with your template. Try deactivating/reactivating MyPlaza to see if it fixes the issue.
As for the bank, I'm at work, so can't see what's on line 383 at the mo'.
I'm sure I fixed that though... >_>
Fatal error: Cannot redeclare generate_post_check() (previously declared in /mnt/w0907/d30/s10/b029e080/www/gunzrevolution.com/forums/inc/functions.php:390) in /mnt/w0907/d30/s10/b029e080/www/gunzrevolution.com/forums/inc/plugins/myplaza.php on line 70

O.O;Doesn't work for me, and has never worked.