Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-12 23:22:27

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

asv_show_adv_opt (re-write of rss_show_adv_opt)

So this is a simple plugin based off of rss_show_adv_opt, which originally used JS to show the hidden areas.

REQUIREMENTS
PHP 5+
DOM enabled

The major difference is that this plugin takes advantage of the DOMDocument instead of JS to update the UI. This means that instead of having the page load, then have the hidden areas appear, it will display automatically. I used this plugin since it’s simple yet useful for me.

In the next version, I’m going to introduce some fall back to JS (still researching), so if you don’t have PHP5 and DOM enabled, then it’ll default to the same manner as rss_show_adv_opt.

Download v0.1

Last edited by variaas (2008-01-12 23:35:54)

Offline

#2 2008-01-12 23:43:00

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: asv_show_adv_opt (re-write of rss_show_adv_opt)

i can see this leading to new ways to mod the backend.

i’m running php 5.2.4 and have domxml enabled (i’m assuming thats the right one?)

i still get this error though:

Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in D:\wamp\www\textpattern.dev\textpattern\lib\txplib_misc.php(534) : eval()’d code on line 8

Fatal error: Call to undefined method domdocument::LoadHTML() in D:\wamp\www\textpattern.dev\textpattern\lib\txplib_misc.php(534) : eval()’d code on line 9

Offline

#3 2008-01-12 23:48:42

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: asv_show_adv_opt (re-write of rss_show_adv_opt)

from php.net regarding DOMXML :

“This extension is no longer marked experimental. It will, however, never be released with PHP 5, and will only be distributed with PHP 4. If you need DOM XML support with PHP 5 you can use the DOM extension. This domxml extension is not compatible with the DOM extension. “

domxml and dom are different

Offline

#4 2008-01-13 00:04:27

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: asv_show_adv_opt (re-write of rss_show_adv_opt)

ok i disabled domxl and although the plugin does work (i do get expanded adv opts and ‘more’), i also get these errors at the top:

Warning: DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: htmlParseEntityRef: no name in Entity, line: 54 in D:\wamp\www\textpattern.dev\textpattern\lib\txplib_misc.php(534) : eval()'d code on line 9

Warning: DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: Unexpected end tag : txp:permlink in Entity, line: 209 in D:\wamp\www\textpattern.dev\textpattern\lib\txplib_misc.php(534) : eval()'d code on line 9

Warning: DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: Unexpected end tag : a in Entity, line: 210 in D:\wamp\www\textpattern.dev\textpattern\lib\txplib_misc.php(534) : eval()'d code on line 9

hmm i just realized this is incompatible with any other backend plugin that uses javascript to manipulate the write screen. i had to disable wet_quicklink, lam_article_info, and a lot of other backend plugins that use js in order to get rid of the errors.

Last edited by iblastoff (2008-01-13 00:21:02)

Offline

#5 2008-01-13 01:38:21

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: asv_show_adv_opt (re-write of rss_show_adv_opt)

so still researching if this is going to be a viable solution, but for now we can suppress the warnings by replacing:

  $doc->LoadHTML($output);  

with

  @$doc->LoadHTML($output);

Offline

Board footer

Powered by FluxBB