Saturday here so had some time to create a very basic Mod.
I try to upload it but keeps stating Could not analyze the addon file.
Not sure what the Go is there, as its all plain and simple stuff. Read thru
http://vanillaforums.org/docs/pluginquickstart and
http://vanillaforums.org/docs/plugins and
I also downloaded sample file... just not sure what the go is.
So I have to go out now to a function and uploaded it to one of our dev domains.
Link: sitehelp.com.au/Emocss.zip
Hopefully one of the guys here can check it out and see what I have done wrong.
Its a Emoticon replacement , using pure css instead. Could be useful for very busy forums.
0 • •
Answers
Ste
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Download link is here: ( new ) http://www.sitehelp.com.au/Emocss.zip
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •What I noticed when I downloaded your .zip file is that you didn't include the directory of the plugin.
I made a new .zip and uploaded it, but I also get the same error message, therefore I ask to get the sample file and upload it.
In the meantime I'll dive into the PHP code to analyze the error message.
Edit
First result:
\models\class.addonmodel.php line 388
// Analyze and fix the file.
if (isset($Path) && !$V1) {
try {
$Addon = UpdateModel::AnalyzeAddon($Path, FALSE);
} catch (Exception $Ex) {
$Addon = FALSE;
$this->Validation->AddValidationResult('File', '@'.$Ex->getMessage());
}
if (!is_array($Addon)) {
$this->Validation->AddValidationResult('File', 'Could not analyze the addon file.');
return FALSE;
}
$Addon = array_merge($Stub, $Addon);
} else {
$Addon = $Stub;
if (isset($Path)) {
$Addon['MD5'] = md5_file($Path);
$Addon['FileSize'] = filesize($Path);
}
}
Edit2
I think the error is in this piece of logic:
try {
The addon file (array) is analyzed. There is an exception that's caught. The $Addon variable is set to false and the message is ... hidden from screen by applying the '@' sign.$Addon = UpdateModel::AnalyzeAddon($Path, FALSE);
} catch (Exception $Ex) {
$Addon = FALSE;
$this->Validation->AddValidationResult('File', '@'.$Ex->getMessage());
}
Now we need to ask if @Todd can look at the validation result that's written in a File.
Can you upload the sample file in the meantime please, to eliminate that it's all files that are having problems.
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •Ste
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Also a suggestion, because you have ability to add edits, they aren't time stamped in the thread , so gets confusing following the thread. When an edit is made in this way , could a time stamp also be added ? Would clarify things.
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •So not sure what to try next as I dont want to spam the addons with existing addons. Its no big deal, perhaps best to forget it.
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •// Define the plugin:
$PluginInfo['Emocss'] = array(
'Name' => 'Emocss',
'Description' => 'Replaces emoticons in forum comments with css images.',
'Version' => '1.0',
'RequiredTheme' => FALSE,
'RequiredPlugins' => FALSE,
'HasLocale' => FALSE,
'Author' => "422",
'AuthorEmail' => 'steve@422.com.au',
'AuthorUrl' => 'http://30.com.au',
'License' => 'GPL v2',
'RequiredApplications' => array('Vanilla' => '2.0.17')
);
/**
* EMOcss
*
* This is a very simple plugin, which replaces image smileys with pure css simleys.
* Thus it saves on server requests, each time an image is requested thats one trip back and
* forth to your server. Got a thread with 50 posts, and 3 smileys in each post ? then pure css
* can make sense
**/
class EmocssPlugin implements Gdn_IPlugin {
public function PostController_Render_Before($Sender) {
$this->_Emocss($Sender);
}
public function DiscussionController_Render_Before($Sender) {
$this->_Emocss($Sender);
}
private function _Emocss($Sender) {
$Sender->AddJsFile('plugins/Emocss/emocss.js');
$Sender->AddCssFile('plugins/Emocss/emocss.css');
}
public function Setup() { }
}
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •They have google code projects so you can easily browse the source if you like.
My addons: NillaBlog | Vanoogle
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •I use eclipse to do development, there's a plugin for PHP development that works out rather well. I have an ANT build script that automatically generates the zip files necessary to upload my addon to the site here.
My addons: NillaBlog | Vanoogle
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •When you find some time, please, could you update the approved status of my plugins?
I've updated them and republished them with the new launch of .18
TYVM in advance :)
My addons: NillaBlog | Vanoogle
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •@422, I tried downloading your plugin, extracting it, re-zipping and then uploading it and it worked no problem. I don't know why, but I guess our php zip library can't recognize your zip. I'll switch the author to you soon.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •