[SOLVED] Small glitch in a Pale Moon Add-ons page

Anything to do with the Pale Moon add-ons website. (addons.palemoon.org)
Not for questions about add-ons themselves!
Forum rules
Important: This board is for specifics regarding the add-ons website (addons.palemoon.org) and not to report extension compatibility issues or discuss different extensions.
Please only post here when your topic is directly related to the add-ons website service so our moderators don't have to move your posts all the time...
KNTRO

[SOLVED] Small glitch in a Pale Moon Add-ons page

Unread post by KNTRO » 2015-04-24, 05:26

Some weird voice spoke to me… :eh:
Notice: Undefined index: author in /aura/accounts/mcp/palemoon/data/sites/palemoon.org/addons/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 13

Notice: Undefined index: description in /aura/accounts/mcp/palemoon/data/sites/palemoon.org/addons/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 16
Last edited by KNTRO on 2015-04-27, 11:52, edited 1 time in total.

squarefractal

Re: Small glitch in a Pale Moon Add-ons page

Unread post by squarefractal » 2015-04-24, 05:35

I'd assume some problems with the site's PHP code.

A bit of Googling shows that the code in question is originating from a CMS named "CMS made simple".

New Tobin Paradigm

Re: Small glitch in a Pale Moon Add-ons page

Unread post by New Tobin Paradigm » 2015-04-24, 10:45

Ryan simply forgot a quote mark in manifest.ini which is used to define the page contents of every extension. (Not like I haven't done the same thing)

Yes right now CMSMS is used to drive the site but I am keeping most of everything I can out of the CMS because it is short term and all the metadata for each extension will need to be imported to a better solution later.. So I wrote some code to read a manifest.ini file (in lieu of a database which those ini files can be easily read and a db built from them). Yeah it is a bit primitive but it is better than shoving all the info into a CMS that will be replaced in the future and be less work when that happens.

However, knowing that it IS CMSMS doesn't help anyone solve the problem because this had nothing to actually do with CMSMS.. It was a custom user defined tag I wrote that reads and external file and that external file had the issue, the a fore mentioned missing quote in manifest.ini.

anyway.. RESOLVED FIXED

As an aside if you are interested.. This is how it works.. I apply an id say pm-139 to the CMSMS page and then for content I enter {theme_body} and it generates the page on the fly using this code:

Code: Select all

$addon_cms_type = $smarty->fetch("eval:{page_attr key='extra1'}");
$addon_cms_id = $smarty->fetch("eval:{page_attr key='extra2'}");

$addon_manifest = parse_ini_file($_SERVER["DOCUMENT_ROOT"] . "/phoebus/datastore/" . $addon_cms_id . "/manifest.ini");

$addon_path = "/phoebus/datastore/" . $addon_manifest["id"] . "/";
$addon_preview = $addon_path . "preview.png";
$addon_xpi = $addon_path . $addon_manifest["xpi"];

$output = '
<h1><img src="' . $addon_path . 'icon.png" style="height: 32px; width: 32px;" class="alignright">
' . $addon_manifest["name"] . '</h1>
<p style="margin-top: -18px">By: ' . $addon_manifest["author"] . '</p>

<h3>About this ' . $addon_manifest["type"] . '</h3>
<p>' . $addon_manifest["description"] . '</p>
<img src="' . $addon_preview . '" class="aligncenter"/>

<h3>Compatibility</h3>
<p>' . $addon_manifest["name"] . ' version ' . $addon_manifest["version"] . ' works with Pale Moon ' . $addon_manifest["compat"] . '</p>


<p style="text-align: center; padding: 10px;"><a class="dllink_green" href="' . $addon_xpi . '"><img border="0" src="/media/img/layout/download.png" alt="" style="width: 24px; height: 24px; position: relative; top: 7px; right: 4px;"></img>Download ' . $addon_manifest["name"] . '</a></p>

<p style="text-align: center; padding: 10px;"><small>Extra Info: ID: ' . $addon_manifest["id"] . ' | Type: ' . $addon_manifest["type"] . ' | GUID: ' . $addon_manifest["guid"] . '</small></p>
';

print ($output);
That code reads the following data in manifest.ini file which is:

Code: Select all

[addon]
id="pm-139"
type="theme"
guid="{8a13d488-8657-4dab-b98e-98e62085837f}"
xpi="qutelegacy-1-0-3-pm.xpi"
compat="25.*"

[meta]
name="Qute Legacy"
version="1.0.3"
author="Lootyhoof"
description="Customized version of Arvid Axelsson's great theme. Fork of \"Qute 3++\" by Murphy."

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: Small glitch in a Pale Moon Add-ons page

Unread post by Lootyhoof » 2015-04-24, 16:04

Yeah...my bad. Whoops. :silent:

KNTRO

Re: Small glitch in a Pale Moon Add-ons page

Unread post by KNTRO » 2015-04-27, 11:52

Thanks Matt! ;)