41
Peekay
Re: Xoops 2.5 Module Admin Class - some observations
  • 2013/2/22 22:35

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The config check is very good and I found the entries in index.php, e.g.

$index_admin->addLineConfigLabel(_AM_FILEBOX_CONFIG_PHP$xoopsModule->getInfo("min_php"), 'php') ;


but is it possible to check and display (green or red) other server settings?. I would really like to detect 'PHP safe-mode' (I know it is deprecated in PHP 5.3 but I still need to detect it) and also 'URL fopen'. I know the INI_GET methods, I just wondered if there was a built-in function.



42
Peekay
Re: Xoops 2.5 Module Admin Class - some observations
  • 2013/2/18 21:07

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


No problems. It's a great utility. Still working my way through it.



43
Peekay
Re: Xoops 2.5 Module Admin Class - some observations
  • 2013/2/18 20:54

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The lang definitions for xoops_version.php in the tutorial include the licence link:

$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/";


but this gives a 404. You just need to lose the trailing slash from the URL.

Also, the cut-n-paste code for modinfo.php includes the following:

define _MI_XDIR__ADMENU2_DESC" , "Add/Edit Links");
define _MI_XDIR__ADMENU3_DESC" 
"List New Links");
define _MI_XDIR__ADMENU4_DESC" , "List Broken Links");
define _MI_XDIR__ADMENU5_DESC" 
"List Requested Modifications");


which are missing an opening bracket and double-quote, e.g.

define("_MI_XDIR__ADMENU5_DESC" "List Requested Modifications");


Much as I hate to say it, this code also has... spaces, which will probably make Transifex scream like a girl.





44
Peekay
Re: Setting manual trust path = blank module install page
  • 2013/2/18 18:50

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Quote:

Mamba wrote:

Of course, the content of /xoops_lib has to be there too.


Thx Mamba, that helped me find the problem. In Xoops 2.3, I used a different version of protector than the one that shipped with Xoops. The install instructions said to set up a folder as the trust path and I did, not realising that the xoops_lib folder could have been used for this. Looking inside xoops_lib, I can now see the 'modules' folder.

It does appear however, that the Protector folder needs to be copied to the folder you choose, whether you install it or not, otherwise you do get the blank module install screen.

@irmtfan

Yes, the back-slash thing is a separate issue with DHTML, or perhaps sanitiser.



45
Peekay
Re: Flash cookies try to load, but banners are disabled
  • 2013/2/17 15:45

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


That plugin is REALLY interesting. I had no idea about these cookies. Many thx for the info.

I appear to have LSO cookies set by the BBC iPlayer (emp.bbci.co.uk), Brightcove, a cloud video service, YouTube (s.ytimg.com) an online website builder called (weebly.com) which I assume was set from visiting one of the sites they host and Post Affiliate Pro (imtek.postaffiliatepro.com) - an affiliate tracking system. They actually set two cookies while I was researching!

Cookies like the ones from the affiliate system do raise privacy issues (IMHO) because they are simply data-gathering and not user experience related. I would think that any website which is using flash cookies to store user data without their consent is potentially in breach of the EU Cookie Directive.

I haven't found any (yet) from visiting XO though?



46
Peekay
Re: Flash cookies try to load, but banners are disabled
  • 2013/2/17 14:31

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Do you mean this cookie is being set when you visit xoops.org? If I check cookies, on the XO homepage I get:

PHPSESSID
__utma
__utmb
__utmc
__utmz

Viewing the forum I get the additions:

newbb_OLV
__atuvc

Logging in adds:

newbb_27086LV
xoops_org_user


The PHPSESSID is a required cookie from the Xoops CMS. All the __utm* cookies are from Google analytics. The __atuvc cookie is from the 'Add This' social media bookmarking utility in the right block. The others are from the CBB (NewBB) forum.



47
Peekay
Re: Flash cookies try to load, but banners are disabled
  • 2013/2/16 23:13

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


What is the name of the cookie?



48
Peekay
Xoops 2.5 Module Admin Class - some observations
  • 2013/2/16 23:06

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The PDF guide and tutorial for updating modules to the new Xoops 2.5 admin class is very good. The only problem I found was this instruction:

Quote:
open main.php and rename all occurrences of 'index.php' to 'main.php', except the 'redirect_header' entries like this:

redirect_header("index.php",1,_MD_VOTEDELETED);

They need to stay the same, i.e. don’t replace the index.php here.


I'm not sure how often this will be appropriate. If 'main.php' submits a form, it will generally need to redirect back to 'main.php' after the form is submitted. On the module I am working on, I found that changing all the links to main.php, including the redirects, worked properly for me, otherwise I wound up back at the module homepage.

Also, if you are tackling a really old module, make sure 'xoops_version.php' has the entry:

$modversion['adminmenu'] = "admin/menu.php";


...otherwise nothing will work. This entry was not used by older modules when they had a stand-alone menu function.

Other than this, I found it a great guide to the recommended module structure for 2.5 and was easy to follow. Thanks for providing that information.



49
Peekay
Re: Setting manual trust path = blank module install page
  • 2013/2/16 21:32

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


OK, the Protector error may only affect people that set a trust path for modules, but the fact that the Xoops DHTML editor strips out back-slashes inside 'code' tags is definitely a bug. The code tag should render a safe entity for every character entered, no matter what it is.



50
Peekay
Can notifications become W3C valid?
  • 2013/2/16 21:25

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


If someone on the core team gets a moment, it would be nice if they could update the code in 'system_notification_select.html' so that it validates with the W3C. The '[' character is not allowed in the value of an ID, and duplicate IDs are also a problem, for example...

<input type="checkbox" id="not_list[]" name="not_list[1][status]" value="1"  />
<
input type="checkbox" id="not_list[]" name="not_list[2][status]" value="1"  />

I know this doesn't stop things working, but it is annoying when you eventually get some old module HTML to validate and the only remaining fail is the core code.




TopTop
« 1 2 3 4 (5) 6 7 8 ... 187 »



Login

Who's Online

162 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits