MyBB Community Forums
Script to Update Plugins for 1.6.5 - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Script to Update Plugins for 1.6.5 (/thread-108595.html)

Pages: 1 2 3 4 5 6 7 8 9 10


RE: Script to Update Plugins for 1.6.5 - shinekwt - 2011-12-20

I'm receiving the below error message

Quote:Done searching for needed updates
Starting updates

Unable to update /home/admin/****/forum/inc/plugins/ad_after_post.php

Unable to update /home/admin/****/forum/inc/plugins/adsafp.php

Unable to update /home/admin/****/forum/inc/plugins/autoembed.php

Unable to update /home/admin/****/forum/inc/plugins/coinslider.php

Unable to update /home/admin/****/forum/inc/plugins/fblike.php

Unable to update /home/admin/****/forum/inc/plugins/games.php

Unable to update /home/admin/****/forum/inc/plugins/gomobile.php

Unable to update /home/admin/****/forum/inc/plugins/google_seo/meta.php

Unable to update /home/admin/****/forum/inc/plugins/hello.php

Unable to update /home/admin/****/forum/inc/plugins/hpc.php

Unable to update /home/admin/****/forum/inc/plugins/hpmpexp.php

Unable to update /home/admin/****/forum/inc/plugins/mceap.php

Unable to update /home/admin/****/forum/inc/plugins/minps.php

Unable to update /home/admin/****/forum/inc/plugins/my_awards.php

Unable to update /home/admin/****/forum/inc/plugins/my_mood.php

Unable to update /home/admin/****/forum/inc/plugins/mybbpublisher.php

Unable to update /home/admin/****/forum/inc/plugins/rbutt.php

Unable to update /home/admin/****/forum/inc/plugins/regsecureq.php

Unable to update /home/admin/****/forum/inc/plugins/rememberus.php

Unable to update /home/admin/****/forum/inc/plugins/scd_hide_fg.php

Unable to update /home/admin/****/forum/inc/plugins/social.php

Unable to update /home/admin/****/forum/inc/plugins/socialsites.php

Unable to update /home/admin/****/forum/inc/plugins/stcp.php

Unable to update /home/admin/****/forum/inc/plugins/tapatalk.php

Unable to update /home/admin/****/forum/inc/plugins/thankyoulike.php

Unable to update /home/admin/****/forum/inc/plugins/threadratinglog.php

Unable to update /home/admin/****/forum/inc/plugins/undodelete.php

Unable to update /home/admin/****/forum/inc/plugins/uqip.php

Unable to update /home/admin/****/forum/inc/plugins/yMoods.php

Please help me to solve this issue



RE: Script to Update Plugins for 1.6.5 - pavemen - 2011-12-20

looks like a permissions issue or a host doe snot allow the php functions I use.


RE: Script to Update Plugins for 1.6.5 - novamax - 2011-12-22

Great tool - Fixed the "Board Messages not working after Update 1.6.5" for me perfectly!


RE: Script to Update Plugins for 1.6.5 - lexy - 2011-12-25

I run this tool on the 1.6.4 and everything goes ok,after that i do upgrade to 1.6.5 all plugin works like charm.Thank Pave
and one more question can i delete your script from FTP


RE: Script to Update Plugins for 1.6.5 - pavemen - 2011-12-25

yes, once you upgrade your plugins you can delete it. however, if you add any other plugins that are not yet updated, you will have to run it again


RE: Script to Update Plugins for 1.6.5 - lexy - 2011-12-25

ok thanks man you RULE


RE: Script to Update Plugins for 1.6.5 - Alan11 - 2012-01-01

Just tried the script out, works like a charm, everything is back to normal. A shout out to pavemen! Big Grin


RE: Script to Update Plugins for 1.6.5 - Diogo Parrinha - 2012-01-09

I'm not sure if this is supposed to happen but I decided to give it a try and this is what I got for one of my plugins:
Looking in /path_to/inc/plugins/myadvertisements.php

Array
(
    [0] => Array
        (
            [0] => /function myadvertisements_postbit[ ]*\([ ]*\$/i
            [1] => /function myadvertisements_postbit_disable[ ]*\([ ]*\$/i
            [2] => /function myadvertisements_admin_tools_menu[ ]*\([ ]*\$/i
            [3] => /function myadvertisements_admin_tools_action_handler[ ]*\([ ]*\$/i
            [4] => /function myadvertisements_admin_permissions[ ]*\([ ]*\$/i
        )

    [1] => Array
        (
            [0] => function myadvertisements_postbit(&$
            [1] => function myadvertisements_postbit_disable(&$
            [2] => function myadvertisements_admin_tools_menu(&$
            [3] => function myadvertisements_admin_tools_action_handler(&$
            [4] => function myadvertisements_admin_permissions(&$
        )

)


However, those functions already have the ampersand there so they shouldn't require updating.
This is just one of the multiple cases where this happens. Is it supposed to be like this?
I mean, it is shown after:
Quote:Done searching for needed updates
Starting updates

And these are not needed updates because they're already there.


RE: Script to Update Plugins for 1.6.5 - pavemen - 2012-01-09

(2012-01-09, 11:53 AM)Pirata Nervo Wrote: I'm not sure if this is supposed to happen but I decided to give it a try and this is what I got for one of my plugins:
Looking in /path_to/inc/plugins/myadvertisements.php

Array
(
    [0] => Array
        (
            [0] => /function myadvertisements_postbit[ ]*\([ ]*\$/i
            [1] => /function myadvertisements_postbit_disable[ ]*\([ ]*\$/i
            [2] => /function myadvertisements_admin_tools_menu[ ]*\([ ]*\$/i
            [3] => /function myadvertisements_admin_tools_action_handler[ ]*\([ ]*\$/i
            [4] => /function myadvertisements_admin_permissions[ ]*\([ ]*\$/i
        )

    [1] => Array
        (
            [0] => function myadvertisements_postbit(&$
            [1] => function myadvertisements_postbit_disable(&$
            [2] => function myadvertisements_admin_tools_menu(&$
            [3] => function myadvertisements_admin_tools_action_handler(&$
            [4] => function myadvertisements_admin_permissions(&$
        )

)


However, those functions already have the ampersand there so they shouldn't require updating.
This is just one of the multiple cases where this happens. Is it supposed to be like this?
I mean, it is shown after:
Quote:Done searching for needed updates
Starting updates

And these are not needed updates because they're already there.

the script works in three steps

1) opens every file in the plugin and subfolders and searches for hooks that are in the list of those impacted and found in an add_hooks line and creates a pair of data that is the hooks name and the function name assigned to it. its does not search the function parameters at this time. closes every file after being searched.

2) builds the regex search and replace for all the pairs of hooks/function names.

3) opens every file in the plugin and subfolders that has a pair of data (hooks/functions) and then does a preg_replace using the info from #2, if there is a replacement, it is counted and indicated as such. "starting updates" is just a "dumb" header that is output when that phase starts. If anything is actually changed the number of replacements is output for each file.

its not a super smart script but it works in 99.999% of the cases. its just not elegant about its output.


RE: Script to Update Plugins for 1.6.5 - Diogo Parrinha - 2012-01-09

Alright I see, thanks you.