[pmwiki-users] EditMore not removing/updating tags

adam overton a at plus1plus1plus.org
Sun Mar 2 07:14:29 CST 2008

well, i sort of just answered my own question. i solved the problem,  
though i'm unsure if i've broken anything else in the process. in  
anycase, for reference to others, EditMore now works for MY tagging  
needs if i do the following:

     * the problem is solved if you change this:
           o $new['text'] = "(:tags:".$new['tags'].":)\n".$new['text'];
		---> to this
           o $new['text'] = "(:tags:".$new['tags'].":)\n"; // old  
'text' begone!!

new text no longer appended to top of old text - old text is wiped  
out, goodbye...

also, noticed that some case-insensitivity was not allowing forms to  
be resized:

     * was unable to change the size/width of Tags b/c the  
$EMTagsInputDisplay is printed in lowercase as $emtagsinputdisplay  
when placed in the stylesheet (same for $emdescriptioninputdisplay,  
$emnotesinputdisplay, etc...)

since i'm new to this, i'm not sure what the policy is on committing  
changes to other people's work, so i'm leaving my hands off. instead  
i've appended my notes to the Comments section...

(what is the policy on updating cookbook code, btw?)

alright. hope you've enjoyed this conversation with myself as much as  
i have,

> hi there
> 1st time poster to this list (!)
> was wondering if i could ask a question about the Cookbook code for
> 'EditMore'?
> so far it's proving pretty useful for creating tags automatically -
> the problem i'm running into is that it's not letting me fully remove
> or change the tags i create.
> for instance, let's say i have a page and add the following tags into
> the EditMore (:input e_tags:) blank:
> - tag1, tag2
> then i come back later and decide to add another tag:
> - tag1, tag2, tag3    (the form actually displays this: [[!tag1]], [[!
> tag2]] ... and i add tag3
> and then i come back and decide i didn't like some of those tags:
> - tag2    (tag1 & 3 removed)
> when displayed on the main page using {$:tag}, i still get the very
> first set of tags:
> - tag1, tag2
> (in fact, tag3 never showed up in between rounds when it should have)
> so: the main page with the {$:tag} doesn't seem to be updating/
> removing-the-old-tags, though (:input e_tags:) IS getting updated.
> question: any ideas on how i could tweak the EditMore code so that it
> officially removes discarded tags?
> (or could i be doing something wrong?)
> btw, here's an excerpt of what's posted in the actual page file after
> having tags added then removed - it appears that the new tags are
> just being appended to the front of a list, and the old tags are just
> sticking around, not being removed...
> . . .
> tags=
> targets=
> text=(:tags:[[!tag2]]:)%0a(:tags:[[!tag1]], [[!tag2]], [[!tag3]]:)%0a
> (:tags:[[!tag1]], [[!tag2]]:)%0a
> . . .
> many thanks in advance!
> adam

More information about the pmwiki-users mailing list