VisioList 0.6 Released

Mark

Administrator
Staff member
Today we are proud to announce the release of VisioList 0.6, featuring several bug fixes, security patches, and some other user requested improvements.

head over to the downloads section and get your copy now

Enjoy!
 

membrain

New Member
I'm new at this, if I upgrade from 0.5 to 0.6, I just upload everything and then delete the "install" folder and that's it?
Wouldn't it be easier (for us) to just update a couple of files that you modified/tweaked/added instead of re-uploading the entire script? Some modifications we've done are lost in this process. Just my thoughts...

Thanks,
Mark
 

Mark

Administrator
Staff member
The instructions for upgrading are found in the download thread, for 0.5 to 0.6 yes simply overwrite the files and delete the install folder.

Every single php file was modified in this release, and several tweaks to the skin templates.

The only modifications you should ever need to re-apply are those made to your skin, but those would be minimal. CSS changes should be applied in user.css (which you don't need to overwrite, in the future I will ensure to remove this file from the upgrade bundle).

I manage many sites with frequent script updates, the best advice I can give you is to use good FTP software (like filezilla) that gives you the feature to overwrite files that are a different size (modified) automatically. This makes life much easier for upgrading all scripts. In the future we will be adding a "Diff" script to the admin panel to compare templates for changes, but there are plenty of these freely available now for PC and mac.

We did consider posting only modified files but at the moment it would dramatically slow down development, and would be prone to error, hopefully in the future this is something we can do though.
 

Mark

Administrator
Staff member
you should never need to recode or modify any PHP files, that is 100% the reason for us introducing the plugin system, it allows you to modify the PHP stuff without changing your files :) IF you start hacking PHP files, i guarantee you will find our frequent updates will become the bain of your existence. Plugins are dead easy to write and if you need more hook locations in the core let us know and we'll be happy to add them. But in 2012 we are expecting 2 releases per month or more, so its well worth doin it the right way.
 

membrain

New Member
Things like "/images/button.png" I'm sure you can exclude in future updates ;)
Also I'm currently giving out 7 days premium for new members, this is one problem that involves php modification ... and when I update I have to keep track of this file. Any work-around?
 

Mark

Administrator
Staff member
indeed, the images directory can be removed for upgrades. Thanks for mentioning that.

instead of modifying your sources/join.php lets create a simple plugin to handle your php code.

Most likely your adding a single mysql query somewhere near the end of join.php. So make a plugin file join_insert_data.php and paste only your query in that.

here is a basic walkthrough:

1) Create a new folder /plugins/Myplugin/
2) Create a languages folder /plugins/Myplugin/languages
3) Create empty english.php file /plugins/Myplugin/languages/english.php
4) Create empty index.html in /plugins/Myplugin/
5) Create /plugins/Myplugin/join_insert_data.php with your custom php code.

the contents of join_insert_data.php will be executed just like an include where you see the hook location:

PHP:
 eval (PluginManager::getPluginManager ()->pluginHooks ('join_insert_data'));
this is how plugins work, sprinkled through the php files are hook locations like the one above, whatever the value is (in this case join_insert_data) that is the name of the file we use for the plugin. This totally seperates your modified code from the core code allowing for easy, breezy upgrades :)

If you have any questions please ask
 

membrain

New Member
Got it Mark but I still need to modify the php file to include this plugin eval, right? In this case: "approve.php"?
 

Mark

Administrator
Staff member
no need, if your using manual approval then you would use the hook locations already found in approve.php. My example above is if you were modifying join.php, every php file has its own hook locations, open approve.php and you should see the evals (hook locations) at your disposal, in this case eval (PluginManager::getPluginManager ()->pluginHooks ('admin_approve_do_approve')); is probably what your after.
 

membrain

New Member
OK, the 1st one is the hardest. Here's what I did so far:
Created the folder / files in the plugins folder.
approve.php contains:
PHP:
<?php
 
    // Approve Site and give free Premium
    $free_premium_date = date('Y-m-d', time() + (3600*$CONF['time_offset']));
 
    $DB->query("UPDATE {$CONF['sql_prefix']}_sites SET premium_flag = 1, date_start_premium = '{$free_premium_date}', total_day = 7, remain_day = 7, weeks_buy = 1  WHERE username = '{$username}'", __FILE__, __LINE__);
 
?>
Now how do I activate the plugin? I need to zip it and upload via ADMIN interface? or?
 

Mark

Administrator
Staff member
this is all you need to do.

plugins/YOURPLUGIN/admin_approve_do_approve.php

with the contents of (NO OPENING CLOSING PHP TAGS)
PHP:
    // Approve Site and give free Premium
    $free_premium_date = date('Y-m-d', time() + (3600*$CONF['time_offset']));
 
    $DB->query("UPDATE {$CONF['sql_prefix']}_sites SET premium_flag = 1, date_start_premium = '{$free_premium_date}', total_day = 7, remain_day = 7, weeks_buy = 1  WHERE username = '{$username}'", __FILE__, __LINE__);

and your done :) automatically activated.
 
Top