ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Top Authors Plugin for 1x Broken

November 08, 2010 8:57pm

Subscribe [5]
  • #1 / Nov 08, 2010 8:57pm

    Boyink!

    5011 posts

    Hey All—

    I’m trying to use the Top Authors plugin featured on this page:

    http://expressionengine.com/downloads/details/top_authors/

    I’m getting the following output:

    Deprecated: Function ereg() is deprecated in /www/eh13849/public_html/hcs_sys/plugins/pi.top_authors.php on line 79 Deprecated: Function ereg() is deprecated in /www/eh13849/public_html/hcs_sys/plugins/pi.top_authors.php on line 189 Deprecated: Function ereg() is deprecated in /www/eh13849/public_html/hcs_sys/plugins/pi.top_authors.php on line 79 Deprecated: Function ereg() is deprecated in /www/eh13849/public_html/hcs_sys/plugins/pi.top_authors.php on line 189 Boyink - 2

    Additionally, the plugin is listed as 1st party on the page linked to above, but in the plugin code itself the author appears as:

    Donnie Adams
    Author URL   http://www.thedailylife.org/ee/

    And the domain in that url looks to be abandoned.

  • #2 / Nov 09, 2010 2:02am

    You could try replacing the ereg() function with preg_match() - the syntax is slightly different, I think.

    You could also disable the ereg error reporting. if you’re on 5.3, it should still work okay. A version or two on, maybe it won’t….

  • #3 / Nov 09, 2010 2:30am

    Hmm, my quick test w/ the 1.6x plugin didn’t really work. It only returns a partial count of my own entries, no one else’s, and the parameters don’t work. Sorry, don’t know what’s gone screwy with this one….

  • #4 / Nov 09, 2010 3:38pm

    Ingmar

    29245 posts

    It’s only a note for now, I think, but the plugin would have to be modified to work with PHP 5.3. Is that what you are running, Boyink? Also, is it working as intended apart from that?

  • #5 / Nov 13, 2010 12:45pm

    Boyink!

    5011 posts

    Yes - the site is running PHP 5.3.2.

    So - is it working…other than throwing a whole bunch of errors?  😉 Yes - looks like I get an author name and count after all of that..😉

  • #6 / Nov 14, 2010 2:32pm

    Greg Salt

    3988 posts

    Hi Mike,

    Thanks for the report. These (largely untested) changes for the 1.x version should work for you in the short term:

    On line 79 change this:

    if (ereg("^switch", $key))

    to this:

    if (preg_match("/^switch/", $key))

    And on line 189 change this:

    if (ereg("^profile_path", $key))

    to this:

    if (preg_match("/^profile_path/", $key))

    Cheers

    Greg

  • #7 / Nov 15, 2010 5:27pm

    Boyink!

    5011 posts

    Installed and seems to be working -thanks Greg!

  • #8 / Nov 16, 2010 5:05am

    John Henry Donovan

    12339 posts

    Glad Greg was able to help. Feel free as always to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases