Current time: 04-24-2014, 05:49 AM Hello There, Guest! (LoginRegister)


Post Reply 
PluginLibrary 12
01-19-2012, 09:04 PM
Post: #21
RE: PluginLibrary 6
Another great update frostschutz. I just wish more people actually used this.

Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2012, 09:07 PM
Post: #22
RE: PluginLibrary 6
I think the new features are really cool, but I have some questions.

If the user edits a template in the ACP, MyBB writes the current MyBB version code to the template record. There is no support for user versions (e.g. multiple edits within a given MyBB version/release).

I looked at PL6 and noticed it was pushing version = 1 for sid = -2 (master template) but that wont let the Find Updated work since it requires the master version to be g.t. than the edited template version

PHP Code:
    $compare_version $mybb->version_code;
    
$query $db->query("
        SELECT COUNT(*) AS updated_count
        FROM "
.TABLE_PREFIX."templates t 
        LEFT JOIN "
.TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version)
        WHERE t.sid > 0 AND m.template != t.template
    "
); 

Personal site: CommunityPlugins.com

Please do not PM me for MyBB support here. Use the forums, they are here for a reason. Thanks.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2012, 09:29 PM (This post was last modified: 01-20-2012 02:27 AM by frostschutz.)
Post: #23
RE: PluginLibrary 6
This user has been denied support. This user has been denied support.
Those version numbers refer to MyBB versions exclusively. This is because this feature is originally intended for MyBB only, and templates only change when MyBB gets updated (which also changes the MyBB version). So if a user edits templates today, it will have the version 1605, and when MyBB 1.6.6 gets released any updated templates there will have the version code 1606 which will be larger than the user edited one...

This just doesn't work for plugin template versions, since plugins can update any time regardless of MyBB version. So instead of using MyBB version numbers, PluginLibrary simply uses 0 or 1 for version numbers and considers any template change as an update. So when PluginLibrary updates a template, it sets the user edited template version to 0. And since the master template has version 1, it'll show up in the updated templates.

This works fine in most cases; the only case that is not covered here that I can think of, is importing themes. It's possible to import an outdated plugin template which then won't show up in find updated templates - it's impossible to tell which plugin version it once belonged to because MyBB sets it to the MyBB version instead.

Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary @ GitHub/frostschutz
Find all posts by this user
Quote this message in a reply
02-08-2012, 11:42 AM
Post: #24
RE: PluginLibrary 6
this plugin is not installing what is the problem in it when i install it. nothing happens
Find all posts by this user
Quote this message in a reply
02-08-2012, 12:06 PM
Post: #25
RE: PluginLibrary 6
This user has been denied support. This user has been denied support.
It's not really a plugin, but rather a library for other plugins. You just put it in your plugins folder, and it will show up in the list (mainly to show you that it's there and which version of it you currently have). You don't have to install/activate it, and if you try it should show you an OK message telling you that it doesn't have to be activated in order to work.

Plugins using this library just load it whenever they actually need it.

Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary @ GitHub/frostschutz
Find all posts by this user
Quote this message in a reply
03-16-2012, 09:44 PM
Post: #26
RE: PluginLibrary 6
Can/should we ship PluginLibrary with our plugins? Or should installing it be a requirement?
Find all posts by this user
Quote this message in a reply
03-16-2012, 11:17 PM
Post: #27
RE: PluginLibrary 6
This user has been denied support. This user has been denied support.
You can, but you really shouldn't ship it with your plugin. Sooner or later there may be a new version of PluginLibrary. But your plugin keeps shipping the old one until you also update it - which could cause problem for plugins that depend on the new version. And chances are you won't be able to update yours because you were killed by a piano which fell from the sky or something.

Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary @ GitHub/frostschutz
Find all posts by this user
Quote this message in a reply
03-17-2012, 07:00 PM
Post: #28
RE: PluginLibrary 6
A plugin that depends on another plugin (e.g. PluginLibrary), should never ship it in the download. You should just clearly state the dependency in the description.

In an ideal world, you could specify dependencies in your plugin_info() function and boards owners could search & install plugins (including their dependencies) directly from their ACP.

Creativity is a drug I cannot live without.
[Image: 1]Support PM will be ignored
Visit this user's website Find all posts by this user
Quote this message in a reply
03-30-2012, 02:58 AM
Post: #29
RE: PluginLibrary 6
Is there any function to check if a desired patch is applied? I want to hide the *Apply Patch* link if it is already applied just like google seo.

But the example hello plugin doesn´t show that.

Support PM's will be ignored. Angel
Visit this user's website Find all posts by this user
Quote this message in a reply
04-03-2012, 10:56 AM
Post: #30
RE: PluginLibrary 6
This user has been denied support. This user has been denied support.
Yes, you can check like so:

PHP Code:
if(edit_core($yourname$yourfile$youredits) === true)
{
    echo 
"Our patch is already applied.";


The return value is explained in the documentation. I'll try to put this example into the hello_pl plugin sometime.

Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary @ GitHub/frostschutz
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication