Could someone write-up a short tutorial on creating a plugin for Xanthia?
I am looking for something that I can pass it variables from the theme and have it return an image with a link built from the variables, sort of like the topic icon but a different image.
--
Zikula Themes
- craigh responded to »TagIt 3.0 for Zikula« 03:58 PM
- jmvaughn responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 12:05 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Plugins help
-
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
-
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
Have a look at the 'Example' modules plugin for adminlinks, it should give you a very good idea of how to do what you need to do... should be very simple.
--
Under Construction! -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Mike,
Also take a look at the smarty documentation on plugins. The only two plugin types you'll likely write are template functions and modifiers.
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
Ok thanks to both so far, now I have one more question..
How would I get the sites fully qualified URL from within a plugin?
IE http://www.postnuke.com
--
Zikula Themes -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Mike,
Use the API pnGetBaseURL. For use in templates there is the equivalent template tag .
Code
<!--[pngetbaseurl]-->
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
Thanks Mark!
Working out nicely, I am creating a Digg This Article Plugin for news articles.
If I get it working cleanly then I am also going to do it for SlashDot too.
:)
--
Zikula Themes -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
Ok next newbie question.
I have to urlencode all of the inputs, I have gotten all of them to encode EXCEPT the URL I have to pass, the relevant code is below
Code
$baseid = pnGetBaseURL();
$baseid .= "index.php?name=News&file=article&sid=";
$baseid .= $articleid;
$baseid = rawurlencode($baseid);
--
Zikula Themes -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 418
Would this help:
Code
$baseid = pnGetBaseURL() . "index.php?name=News&file=article&sid=" . $info[sid];
Then, I;m not using Short-URLs, so i wouldn't know what happens what the output will be when using short-urls. -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
I'm not having a problem with the variables for the plugin, the OUTPUT of the plugin needs to be urlencoded so the entire URL can be passed in the URL for the submit.
--
Zikula Themes -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 418
Oh, I thought you were having trouble building the URL..
On this plugin thing for Digg This for WordPress: http://www.seoegghead.com/blog/seo/how-to-get-dugg-digg-for-wordpress-plugin-p113.html
They're using urlencode and not rawurlencode.
I could be wrong though, just trying to help ;) -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
I tried urlencode as well, it is just this part that isn't encoding..
And it is driving me insane... lol
--
Zikula Themes -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
Maybe you should be using XHTML symbols rather than ?(?) and &(&)?
--
Under Construction! -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 111
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
