Welcome to Geeklog, Anonymous Sunday, October 06 2024 @ 09:43 pm EDT
Geeklog Forums
Autotag plugin
Page navigation
jmucchiello
Allows the site administrator to create autotags from the admin interface. The plugin features:
- Text substitution autotags.
- PHP based autotags using specially named function: phpautotags_yourtag
- PHP based autotag creation restricted to users with autotags.PHP feature (similar to the staticpages.PHP feature).
- Autotags can be enabled or disabled individually. (Makes it easier to test them.)
- Text based autotags use predefined substitution values to make "dynamic" autotags easier to construct. In a tag like this: [yourtag:id Other text] the text autotag can contain #1 and #2 to be replaced by "id" and "Other text" respectively. Other substitutions in #U as your site url and #0 which contains everything after the colon.
- A userland list of autotags can be attached to the main menu. This list contains all active autotags (including those created by other plugins) with a description of the autotag. The idea is for this to be used as a "help" screen for autotags. Plugins can support this create by creating a plugin_autotag_description_$plugin function to return autotag descriptions. V1.0 of the autotag plugin include description function for the plugins that ship with geeklog.
- Comes with 4 sample autotags, each initially disabled:
- poll: links to a poll on the local website
- topic: a PHP link to a topic on your website, pulls the link text from the database. Also checks that the user seeing the link has access to topic. Otherwise prints Unknown Topic.
- youtube: duplicates the youtube plugin submitted about a month or two ago.
- cipher: a PHP letter substitution cipher that shows how rediculous autotags can get. The sample implements rot13. But any letter substitution cipher can be done.
- poll: links to a poll on the local website
jmucchiello
jmucchiello
kazuhiro
BTW, I found a bug that plugin can't be enabled to use a function for tags. Because, in function plugin_getListField_autotags, $_AUTO_CONF is not declared as global variable.
jmucchiello
BTW, I found a bug that plugin can't be enabled to use a function for tags. Because, in function plugin_getListField_autotags, $_AUTO_CONF is not declared as global variable.
samstone
1) it adds a back slash \ before every double quote or single quote. This can be by passed by use the html code "
2) it addess unwanted url infront of the intended url. Can't find where it comes from.
I just want to create send email like to user to user using "email" as a tag and couldn't acommplish the job.
Sam
jmucchiello
1) it adds a back slash before every double quote or single quote. This can be by passed by use the html code "
samstone
The second problem is not yet resolve, which is the main reason it doesn't work. the tag came out to be something like this:
http://www.domain.com%20"http://www.domain.com/user.php...etc."
Sam
jmucchiello
samstone
Thanks,
Sam
jmucchiello
I don't need help at this time.
Here's what I know about the second problem:
http://www.domain.com%20"http://www.domain.com/user.php...etc."
Thanks for your help.
samstone
I just don't have time to post the details here. As you see, I didn't even have time to proofread my post.
First, I just needed a simple [email:#] tag and I got it accomplished through hacking lib-plugin.php, with Mark Evens' help.
Second, after trying out your plugin, I found it to be too premature and quite tedious to decribe the bugs in detail.
Third, until your last post, I didn't even know if you are serious about your plugin enough to test it out yourself on a GL1.4.1, as you said you didn't. Some bugs are too obvious that all you need is to drop your plugin in GL1.4.1 by yourself and create a few tags and you will see what I mean. Otherwise, we have to be back and fort forever. Plus, you are not able see the picture from the clues in my posts.
It's not all your fault. I just don't have time to play with it at this time. In any case, you have a neat plugin that has a lot of potential. I hope someone else will have you test it out.
Sam
kahall
So one at a time if you will. I am stuck at step 5 for now.
What exactly do I do with the config.php file that is in the autotags directory?
Do I just insert the code from it into the public_html/config.php?
jmucchiello
I'll be releasing an update to the autotags plugin in a few days/weeks when I get the time.
jmucchiello
Fixes the known edit bug.
Adds a new builtin autotag: lang, which grants access to the global LANG variables in your system. Not sure if that's useful but it is amusing inside templates. Not really recommended for general use though as autotags are slower than the template system. It's more of a proof of concept tag.
Laugh
Two small things:
I have a simple autotag I created that I use in plain text stories for linking to sites.
For the first tag, as long as the URL does not have www. at the begining it will work, if it does the autotag is returned all screwed. Not sure why.
The second thing, I notice was that the Enabled checkbox in the Admin interface allows you to enable it but you can't disable it from here.
One of the Geeklog Core Developers.
jmucchiello
Later when it calls PLG_replaceTags() to display the content, the autotag receives <a href="www.example.com"></a> in #1 instead of www.example.com. Should I call COM_undoClickableLinks() inside my autotag function? I don't think that will always be correct either.
All I can say is the autotag feature is supposed to make links not parse links. <shrug>
ronack
Tag = wikipedia
Description = Wikipedia entries
Replace with
Then I put the tag in a story like so [wikipedia:interestingstuff Some Interesting Page]
The link looks good and comes up
Some Interesting Page
However the URL looks like this
As you can see it created the proper link but threw in the extra slashes which I think your code change from above should fix. However it also thows in extra URL info for my site which shouldn't be there.
See it in action http://www.nc-emt.com/article.php?story=20071115180224368
Am I not using it properly or is there a problem?
jmucchiello
Page navigation
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content