MyBB Central

Full Version: MYPS Per Post Display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
// Edit 21MAY

MYPS Per Post Display

[Image: post_worth.jpg]

------------------------------------------------------------------------

MYPS Per Post Display _ AJAX

[Image: ajax_before.jpg]

[Image: ajax_after.jpg]

Edit [21.50 / 21st May]

* Fixed Small Bug While Using QuickEdit It Show the MYPS Name unwanted due the if / else statement.

Edit ::

Just showing, no download ...
I will look at your myps_post a bit later. I might work on incorporating that type of feature eventually but I want to wait till 1.4 is out.

Also...with your restrictions mod...you should rename the functions to something more specific. You have forums(), dropdown(), and others that are so generic you run the risk of a function name conflict. At the very least you should prepend them with myps_forums() or even better...myps_res_forums() and myps_res_dropdown().

I took just a glance at your myps_post and I see you have a select * from posts...try to avoid a select all if you can. That query looks like it only needs the message. There are hooks in 1.09 so I am hoping you can hook into the existing plugin to get that information instead of reading it again.
labrocca Wrote:I took just a glance at your myps_post and I see you have a select * from posts...try to avoid a select all if you can.  That query looks like it only needs the message.  There are hooks in 1.09 so I am hoping you can hook into the existing plugin to get that information instead of reading it again.

You can get it from the 'parse_message' hook, but it's already parsed when you recieve it in the function; so code/quote tag and others cant be removed anymore =P
I get this error message -
Warning: Invalid argument supplied for foreach() in /home/fhlinux183/t/tussaudtimes.co.uk/user/htdocs/inc/plugins/myps_post.php on line 74
Why do people always get "errors" while it works perfect overhere ? And it aint an error, it's a warning.
Try this first
Find
Code:
    foreach($custom_mycode as $mycode)
Replace by
Code:
    foreach($custom_mycode as $key => $mycode)


If that doesn't do the job, do this =>
Find
Code:
    $message = remove_custom($message);
Replace by
Code:
    //$message = remove_custom($message);

No customtags will be removed then.
Where do i look for that?
Probably in the file you've downloaded ... inc/plugins/myps_post.php
well it got rid of the error but in the post you get -

[ Invalid Values For Calculation. ]
spikescot2005 Wrote:well it got rid of the error but in the post you get -

[ Invalid Values For Calculation. ]

That's a build-in check :

Code:
    if($mybb->settings['myps_perchar'] != 0 && $mybb->settings['myps_minchar'] != 0)

With a "0" value you can't calculate and become a goodlooking result. So make sure that MYPS per Char and Min Char are different from 0.
Great it works. Thanks

Just one more question, why is the points the way it is -

[ This Post Is Worth 14 POiNTs. ]

EDIT: Fixed it

EDIT 2: If a forum is exempt from earning points it still says [ This Post Is Worth 16 Points. ] IS their anyway to remove this as no points are earned in that forum.
Pages: 1 2 3 4 5