Raised This Month: $12 Target: $400
 3% 

[BETA] [PHP] SourceMod Plugin Updater


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doggie52
Senior Member
Join Date: Jul 2007
Location: Sweden
Old 08-18-2010 , 07:48   [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #1

Doggie52 (dG52) PHP SourceMod Plugin Updater

After hours of work I am finally done with what I think can be of great help to server administrators. I would appreciate if someone could test this on their server and report back with suggestions, feedback or problems! I would also appreciate if someone took their time and helped me out with the UI part of the script!

dG52 PHP SourceMod Plugin Updater grabs a list of the plugins (through 'sm plugins list' via RCON) installed on your server. It then queries both the SourceMod plugin search and the AlliedModders forums for the latest version. After having found the URL of the plugin's forum post it saves this in an SQLite database for future searches.

Usage instructions

Download the archive and extract to your webserver's `htdocs` directory.
Configure the script by opening `config.php` in your favorite text-editor and editing the variables listed.
Then, open the `install.php` file in your browser and let it create the database.

You're done! Open `plugins.php` in your browser and let it do its job.

If the plugin can not find a matching forum URL for a certain plugin, it will tell you so. You can then choose to click the affected plugin's name and add the forum URL yourself!

Changelog

The code lies on an SVN repository - the source code changes can be viewed here. If you prefer to have this in feed format, you can access that here.

Notes

Make sure your script is hosted somewhere only YOU can access it. Do NOT put this on a public webserver - bad things can happen.
Please report any issues in the issue tracker!
The script queries the search and forum pages directly - these can take a long time to download so be patient! The script can take around a minute to complete.
The script uses the srcds rcon PHP class by Geert Broekmans.
The script entirely relies on that plugin authors keep their plugin version up-to-date on the forum post.

Download

http://code.google.com/p/dg52-php-sm...downloads/list

Screenshot


Attached Thumbnails
Click image for larger version

Name:	screenshot-r11.jpg
Views:	576
Size:	95.0 KB
ID:	72550  
__________________
Quote:
Originally Posted by Iltafragit View Post
4kg ram i5 processor

Last edited by Doggie52; 03-18-2012 at 17:10.
Doggie52 is offline
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 08-18-2010 , 15:42   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #2

Very nice Job

I try to check it tomorrow, and will give you feedback.
__________________



Sorry for my very bad english
Greetings HSFighter
HSFighter is offline
Send a message via ICQ to HSFighter
DeaD_EyE82
AlliedModders Donor
Join Date: Jan 2006
Location: Germany
Old 08-19-2010 , 09:05   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #3

Nice Work.
Can you add a function to add the URLS for the Plugins manually?
__________________
German Support for HL2-Servers:

sourceserver.info
DeaD_EyE82 is offline
Send a message via ICQ to DeaD_EyE82
Doggie52
Senior Member
Join Date: Jul 2007
Location: Sweden
Old 08-19-2010 , 11:14   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #4

DeaD_EyE82 - that's basically already implemented - simply edit the SQLite database (with something like SQLite DB browser 1.0) and add a row with the plugin's exact name in the `name` field and the corresponding URL in the `url` field. I'll add an easier way to do this in the near future!

EDIT: I have added this functionality in revision 5! Simply click the plugin's name and it will take you to a page where you can add your own URL. The new download is available on the main post.
__________________
Quote:
Originally Posted by Iltafragit View Post
4kg ram i5 processor

Last edited by Doggie52; 08-19-2010 at 19:37.
Doggie52 is offline
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 08-23-2010 , 18:29   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #5

Sorry for my late feedback.

All fine, it's working great

It's would be nice if your script watch the new plugins to,
and not only the approved plugins:

PHP Code:
// Match the plugin search page against patterns for URL and author
$searchpattern "/(?:title=\"Approved\")(?:.*?)(?:\")(.*?)(?:\")(?:.*?)(?:<a href=\")(?:.*?)(?:\">)(.*?)(<\/a>)/i"
ELSE very nice Work ^^
__________________



Sorry for my very bad english
Greetings HSFighter

Last edited by HSFighter; 08-23-2010 at 18:34.
HSFighter is offline
Send a message via ICQ to HSFighter
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 08-26-2010 , 18:55   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #6

Quote:
Originally Posted by HSFighter View Post
It's would be nice if your script watch the new plugins to...
Quote:
Originally Posted by Doggie52 View Post
... (since, AFAIK, it only returns approved plugins. If it can return unapproved plugins, please let me know how this would be done!)...
I mean new plugins, not unapproved plugins.
Code:
<img src="images/new3.gif" alt="New" title="New">
__________________



Sorry for my very bad english
Greetings HSFighter

Last edited by HSFighter; 08-26-2010 at 19:13.
HSFighter is offline
Send a message via ICQ to HSFighter
Cleric
Member
Join Date: Feb 2009
Location: Sweden
Old 08-24-2010 , 20:11   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #7

This is just great, kudos to you.

Will give this a go on my server in the near future and will hopefully give some feedback.

How about a choice between SQLite and Mysql?
__________________
Cleric is offline
Dravu
Senior Member
Join Date: May 2010
Old 08-24-2010 , 22:16   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #8

Did you get permission to have your script crawl and scrape the forum? I already have enough problems accessing it to be honest. Don't need extra load on the server.

Ask nicely and they might even come up with a much more light-weight search feature for finding plugin versions.

Last edited by Dravu; 08-24-2010 at 22:20.
Dravu is offline
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Old 08-24-2010 , 22:37   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #9

I'll be up front, i don't know nothing about coding, so i'm purely saying this based on what i've read. By the sounds of it your crawling the forums, why not instead query/crawl the list of plugins they keep on the main pages? (http://www.sourcemod.net/plugins.php)

Also, why not get it to work with HSFighter's Wedadmin package
__________________
Xsinthis is offline
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 08-25-2010 , 13:03   Re: [BETA] [PHP] SourceMod Plugin Updater
Reply With Quote #10

Quote:
Originally Posted by Xsinthis View Post
I'll be up front, i don't know nothing about coding, so i'm purely saying this based on what i've read. By the sounds of it your crawling the forums, why not instead query/crawl the list of plugins they keep on the main pages? (http://www.sourcemod.net/plugins.php)
He get the plugin Version from the forum entrys.
The version appears in the headline of the plugin topic.
But the version doun't be show in a row in the pluginlist.

Quote:
Originally Posted by Xsinthis View Post
Also, why not get it to work with HSFighter's Wedadmin package
If i get the permission from Doggie52 to do this,
i will add this nice function to the Webadmin and give the credits to Doggie52.
__________________



Sorry for my very bad english
Greetings HSFighter
HSFighter is offline
Send a message via ICQ to HSFighter
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode