Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#256 2007-04-13 02:43:40
Re: tru_tags: A tagging plugin for textpattern
andreas – check your site, it should be working now. (And my apologies – I think I left the admin switched to English once earlier and forgot to switch it back. Sorry about that!) The problem turned out to be a bug in the plugin with the way it was rewriting the clean URLs. I’ve modified the plugin on your site to make it work, and will be releasing the general-case fix in the next version of tru_tags (hopefully this weekend).
I haven’t tried gbp_permanent_links – how do you want it to work with tru_tags?
Offline
#257 2007-04-13 06:05:47
Re: tru_tags: A tagging plugin for textpattern
truist, thank you very very much – that was a “secret service”, as it were :-).
It works with gpb_permanent_links even though I get this error message when I call a tag-based URL
Notice: Uninitialized string offset: 0 in /home/kgn/incoming/www/v2/textpattern/lib/txplib_misc.php on line 546
It’s not there in “live” mode, though.
Offline
#258 2007-04-13 11:06:41
Re: tru_tags: A tagging plugin for textpattern
I’m glad it’s working :)
Does TXP give you the name of the tag method that causes the error?
Offline
#259 2007-04-13 11:52:37
Re: tru_tags: A tagging plugin for textpattern
No, what I’ve pasted is all I’m getting.
Offline
#260 2007-04-13 23:40:36
Re: tru_tags: A tagging plugin for textpattern
Sometimes if your site is set to ‘debug’ mode you’ll get more useful information by looking at the bottom of the HTML source. Does that give any clues?
Last edited by truist (2007-04-13 23:40:57)
Offline
#261 2007-04-14 07:22:51
Re: tru_tags: A tagging plugin for textpattern
truist, there’s a whole lot of stuff down there. I’ve looked through it looking for hints at your plugin but couldn’t find any – here’s the whole output:
<!-- Runtime: 0,1326 -->
<!-- Query time: 0,001281 -->
<!-- Queries: 49 -->
<!-- Memory: 4983Kb, <txp:tru_tags_from_article /> -->
<!-- txp tag trace:
[SQL (0,000470): select name from txp_lang where lang='de-de' limit 1]
[SQL (0,004169): select name, data from txp_lang where lang='de-de' AND ( event='public' OR event='common')]
[SQL (0,003839): select name, code, version from txp_plugin where status = 1]
[SQL (0,000759): select name, html as type from txp_prefs where event = 'permlinks' AND html <> 'gbp_partial']
[SQL (0,000334): select name from txp_section where `name` like 'konzept' limit 1]
[SQL (0,000269): select * from txp_section where name = 'konzept' limit 1]
[SQL (0,000323): select host from txp_log where ip='87.176.192.52' limit 1]
[SQL (0,000315): insert into txp_log set `time`=now(),page='/v2/konzept/',ip='87.176.192.52',host='p57B0C034.dip0.t-ipconnect.de',refer='',status='200',method='GET']
[SQL (0,001323): select REPLACE(name, 'gbp_permanent_links_', '') AS id from txp_prefs where `event` = 'permlinks' AND `name` REGEXP '^gbp_permanent_links_.{13}$']
[SQL (0,000460): select name from txp_section where (`name` like 'konzept' or `name` like '') limit 1]
[SQL (0,000198): select page from txp_section where name = 'konzept' limit 1]
[SQL (0,000236): select user_html from txp_page where name='section']
[Seite: section]
<txp:page_title separator=" » " />
[SQL (0,000202): select title from txp_section where name='konzept']
<txp:output_form form="headEveryPage" />
[SQL (0,000218): select Form from txp_form where name='headEveryPage']
[Baustein: headEveryPage]
<txp:output_form form="headCss" />
[SQL (0,000197): select Form from txp_form where name='headCss']
[Baustein: headCss]
<txp:output_form form="headMeta" />
[SQL (0,000193): select Form from txp_form where name='headMeta']
[Baustein: headMeta]
<txp:output_form form="headFeeds" />
[SQL (0,000177): select Form from txp_form where name='headFeeds']
[Baustein: headFeeds]
<txp:section/>
<txp:section/>
<txp:section/>
<txp:output_form form="header" />
[SQL (0,000178): select Form from txp_form where name='header']
[Baustein: header]
<txp:link_to_home/>
<txp:sitename/>
<txp:output_form form="nav" />
[SQL (0,000180): select Form from txp_form where name='nav']
[Baustein: nav]
<txp:output_form form="subnav" />
[SQL (0,000202): select Form from txp_form where name='subnav']
[Baustein: subnav]
<txp:if_section name="default">
[<txp:if_section name="default">: false]
<txp:section title="1" wraptag="h1" class="sectionName" />
</txp:if_section>
<txp:section_list active_class="currentSec" break="li" class="subnav" include_default="0" wraptag="ul" sections="schulalltag,zem_event_list,personen,verwaltung,faecher,konzept,gremien,fotos,intern" />
[SQL (0,000756): select name, title from txp_section where name in ('schulalltag','zem_event_list','personen','verwaltung','faecher','konzept','gremien','fotos','intern') order by field(name, 'schulalltag','zem_event_list','personen','verwaltung','faecher','konzept','gremien','fotos','intern')]
<txp:article_custom allowoverride="0" form="basicH3" id="5" pgonly="0" />
[SQL (0,000586): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status >= 4 and Posted <= now() and ID = '5' order by Posted desc limit 0, 10]
[SQL (0,000231): select Form from txp_form where name='basicH3']
[Baustein: basicH3]
[Artikel 5]
<txp:title/>
<txp:body/>
<txp:output_form form="searchForm" />
[SQL (0,000205): select Form from txp_form where name='searchForm']
[Baustein: searchForm]
<txp:output_form form="breadcrumbs" />
[SQL (0,000187): select Form from txp_form where name='breadcrumbs']
[Baustein: breadcrumbs]
<txp:breadcrumb class="breadcrumbs" label="Startseite" link="y" sep=" » " wraptag="p" title="1" />
[SQL (0,000336): select lft as l, rgt as r from txp_category where name='' and type = 'article']
<txp:output_form form="sidebar" />
[SQL (0,000225): select Form from txp_form where name='sidebar']
[Baustein: sidebar]
<txp:if_section name="zem_event_list">
[<txp:if_section name="zem_event_list">: false]
</txp:if_section>
<txp:article_custom allowoverride="0" pgonly="0" sort="LastMod desc" status="4" form="titleList" limit="5" category="aktuelles" />
[SQL (0,001051): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and ((Category1='aktuelles') or (Category2='aktuelles')) order by LastMod desc limit 0, 5]
[SQL (0,000235): select Form from txp_form where name='titleList']
[Baustein: titleList]
[Artikel 3]
<txp:permlink>
<txp:title/>
</txp:permlink>
[Artikel 12]
<txp:permlink>
<txp:title/>
</txp:permlink>
[Artikel 13]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_section name="stichwort">
[<txp:if_section name="stichwort">: false]
<txp:article form="default" />
[SQL (0,000450): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and Section = 'konzept']
[SQL (0,000911): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section = 'konzept' order by Posted desc limit 0, 10]
[SQL (0,000266): select Form from txp_form where name='default']
[Baustein: default]
[Artikel 13]
<txp:article_id/>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:rss_auto_excerpt words="25" excerptwraptag="p" linktext="Weiter lesen »" ending=" [...]" linkwraptag="p" linkclass="readOn" />
</txp:if_article_list>
<txp:ob1_modified format="d.m.Y" />
[SQL (0,000266): select LastMod from textpattern where `ID` = '13' limit 1]
<txp:tru_tags_if_has_tags>
[SQL (0,000239): select Keywords from textpattern where ID='13' AND Keywords <> '']
[<txp:tru_tags_if_has_tags>: true]
<txp:tru_tags_from_article/>
[SQL (0,000222): select Keywords from textpattern where ID='13' AND Keywords <> '']
</txp:tru_tags_if_has_tags>
[Artikel 11]
<txp:article_id/>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:rss_auto_excerpt words="25" excerptwraptag="p" linktext="Weiter lesen »" ending=" [...]" linkwraptag="p" linkclass="readOn" />
</txp:if_article_list>
<txp:ob1_modified format="d.m.Y" />
[SQL (0,000304): select LastMod from textpattern where `ID` = '11' limit 1]
<txp:tru_tags_if_has_tags>
[SQL (0,000250): select Keywords from textpattern where ID='11' AND Keywords <> '']
[<txp:tru_tags_if_has_tags>: true]
<txp:tru_tags_from_article/>
[SQL (0,000228): select Keywords from textpattern where ID='11' AND Keywords <> '']
</txp:tru_tags_if_has_tags>
[Artikel 10]
<txp:article_id/>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:rss_auto_excerpt words="25" excerptwraptag="p" linktext="Weiter lesen »" ending=" [...]" linkwraptag="p" linkclass="readOn" />
</txp:if_article_list>
<txp:ob1_modified format="d.m.Y" />
[SQL (0,000251): select LastMod from textpattern where `ID` = '10' limit 1]
<txp:tru_tags_if_has_tags>
[SQL (0,000210): select Keywords from textpattern where ID='10' AND Keywords <> '']
[<txp:tru_tags_if_has_tags>: false]
</txp:tru_tags_if_has_tags>
[Artikel 9]
<txp:article_id/>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:rss_auto_excerpt words="25" excerptwraptag="p" linktext="Weiter lesen »" ending=" [...]" linkwraptag="p" linkclass="readOn" />
</txp:if_article_list>
<txp:ob1_modified format="d.m.Y" />
[SQL (0,000259): select LastMod from textpattern where `ID` = '9' limit 1]
<txp:tru_tags_if_has_tags>
[SQL (0,000219): select Keywords from textpattern where ID='9' AND Keywords <> '']
[<txp:tru_tags_if_has_tags>: false]
</txp:tru_tags_if_has_tags>
</txp:if_section>
<txp:output_form form="footer" />
[SQL (0,000238): select Form from txp_form where name='footer']
[Baustein: footer]
<txp:article_custom allowoverride="0" form="bodyOnly" id="6" pgonly="0" />
[SQL (0,000541): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status >= 4 and Posted <= now() and ID = '6' order by Posted desc limit 0, 10]
[SQL (0,000204): select Form from txp_form where name='bodyOnly']
[Baustein: bodyOnly]
[Artikel 6]
<txp:body/>
<txp:article_custom allowoverride="0" form="bodyOnly" id="7" pgonly="0" />
[SQL (0,000523): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status >= 4 and Posted <= now() and ID = '7' order by Posted desc limit 0, 10]
[Baustein: bodyOnly]
[Artikel 7]
<txp:body/>
<txp:output_form form="searchFormFooter" />
[SQL (0,000238): select Form from txp_form where name='searchFormFooter']
[Baustein: searchFormFooter]
<txp:output_form form="footEveryPage" />
[SQL (0,000190): select Form from txp_form where name='footEveryPage']
[Baustein: footEveryPage]
[ ~~~ secondpass ~~~ ]
-->
Last edited by andreas (2007-04-14 07:24:58)
Offline
#262 2007-04-14 09:18:46
Re: tru_tags: A tagging plugin for textpattern
andreas wrote:
Notice: Uninitialized string offset: 0 in /home/kgn/incoming/www/v2/textpattern/lib/txplib_misc.php on line 546
If you’re using TXP 4.0.4, that line is part of the callback_event function, so it has to be a tag or plugin that triggers a callback_event. Perhaps that helps to narrow it down:
function callback_event($event, $step='', $pre=0)
{
global $plugin_callback;
if (!is_array($plugin_callback))
return;
$return_value = '';
foreach ($plugin_callback as $c) {
== this line ==> if ($c['event'] == $event and (empty($c['step']) or $c['step'] == $step) and $c['pre'] == $pre) {
if (is_callable($c['function'])) {
$return_value .= call_user_func($c['function'], $event, $step);
}
}
}
return $return_value;
}
Last edited by ruud (2007-04-14 09:20:06)
Offline
#263 2007-04-14 18:21:35
Re: tru_tags: A tagging plugin for textpattern
andreas, I’m not sure. I’ve got the debug info in an email now, so you can probably clear it out of your post (just to save scrolling). What happens if you disable tru_tags – does the warning go away?
Offline
#264 2007-04-17 03:57:12
Re: tru_tags: A tagging plugin for textpattern
All – I’ve just posted tru_tags v2.2 on my site. It includes the recently requested features (set a special class for tags being searched, and enhance the javascript on the admin side) and the bug fix for the problem with clean URLs for sites not at the domain root. As usual, please give it a try and let me know what you think. (I think you’ll like the admin-side stuff. It’s minor, but nice.)
Last edited by truist (2008-07-03 11:48:32)
Offline
#265 2007-04-17 18:44:38
Re: tru_tags: A tagging plugin for textpattern
Nathan, great stuff man! Totally loving the admin java – works well so far, very sweet indeed!!!
Question: TagActive (activeclass). Sorry to sound so dense but how would I invoke this? On my site I’d like the active tag to have a blue background (hightlight) and white text. Would I need to set this up in my CSS file?
Offline
#266 2007-04-17 22:52:41
Re: tru_tags: A tagging plugin for textpattern
> enhance the javascript on the admin side)
What would I have to expect?
(I did…) Uploaded 2.2, activated it and set ‘TRU_TAGS_SHOW_TAGS_IN_ADMIN’, 1);
@Nathan FYI: Nothing to see below the keywords field. Usually on my site it is not activated so I don’t know how it was with 2.1. Maybe I have too many keywords and some array exploded?
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#267 2007-04-18 00:23:21
Re: tru_tags: A tagging plugin for textpattern
shotoshi – yes, you’d have to update your CSS file. By default, you’d want something like:
.tagActive {
background-color: blue;
color: white;
}
merz1 – I’m not sure. Is there anything unusual at the very bottom of the page? What browser are you using? Are there any indications in the status bar that there are javascript errors? Are you using TXP 4.0.4? (I can’t remember.) Any errors showing up at the top of the page? What if you switch your site to ‘debug’ mode?
Sorry for the barrage of questions – let me know if one of them leads to something :)
Offline
#268 2007-04-18 11:36:11
Re: tru_tags: A tagging plugin for textpattern
@Nathan: There was nothing irregular. No red JS errors, no errors at top of the page.
I am using Firefox 2.0.0.3. Textpattern is 4.0.4.
If activated the source code shows a huge block of JS for the keywords but it doesn’t show up on the admin side article write page.
Deactivating rss_admin_show_adv_opts, CoComment, Greasemonkey doesn’t show any success/effect.
Setting Textpattern to debugging mode shows no debugging info in the source code on the admin write page.
DOM inspector shows the script but if I say ‘inspect’ it does not show up in the DOM inspector rendered output. The element script with content is there. Sorry, but I don’t know what more to do with that tool.
Now I switched back to ‘TRU_TAGS_SHOW_TAGS_IN_ADMIN’, 0); as it doesn’t bother me.
The question remains: “What would I have to expect?” From the usage page I couldn’t see any documentation showing me new advantages/features.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#269 2007-04-19 01:27:31
Re: tru_tags: A tagging plugin for textpattern
One last guess: do you have something configured that blocks javascript? What if you try a different browser?
But you’re right, I haven’t documented the feature. Basically, if the tags are visible, the tags that are selected are highlighted (blue background, white text), and if you click one it removes it from the list. It makes it feel a lot easier to maintain the tags.
Offline
#270 2007-04-20 12:49:09
Re: tru_tags: A tagging plugin for textpattern
I actually just installed tru_tags 2.2 yesterday and ran into the same problem (the Tag list not showing up in the admin interface) in both Safari and Firefox on Mac OS X 10.4.9. Using Firefox and FireBug I tracked it down to apostrophes in some of my tags (e.g. “macworld ’07”) and true_tags isn’t correctly escaping them so it prematurely ends the string and breaks the parsing (Firebug shows them as unexpected semicolon errors).
I ran into a similar problem with my mta_digg_it plug-in and so used the php function addslashes() (since html encoding isn’t enough in this case) to escape them.
I personally just went through and removed apostrophes, but that’s not always the best solution. Other characters which could affect this are double-quotes, backslashes, and the like.
Hope that helps.
Last edited by morgant (2007-04-22 01:19:20)
Morgan Aldridge
http://www.makkintosshu.com/
Offline