Wordpress Template Tags Sugar?
Posted: 06 March 2009 12:57 PM   [ Ignore ]
Newbie
Rank
Total Posts:  4
Joined  2009-03-06

Hello, I’m a wannabe Wordpress developer and just thought of a Sugar that would make my (and other developers/designers) life so much easier. The idea came when I read Joey’s post about blogging Sugar.

Is it possible to make a Sugar with Wordpress Template Tags? How I see it is that when I type for example “comments_”, I could get a dropdown with a list of template tags like “comments_link”, “comments_number” etc. to auto-complete. That would speed up Wordpress coding dramatically.

I think there is similar Sugar for ExpressionEngine - I haven’t tested it though since I don’t use EE at all and I’m not familiar with it.

Anyway, just a simple idea. You guys are doing fantastic work, I love the way Espresso is going and really hope it will be the best IDE ever ;) since version 1.0 already :)


Justine

Profile
 
 
Posted: 07 March 2009 12:21 AM   [ Ignore ]   [ # 1 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

That’s a wonderful idea.  I’ve been working with WordPress for some time but I still have to troll through the template tags page in their docs whenever I crack open a template.  Have some WordPress-specific snippets and auto-completions would make life a lot easier.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 07 March 2009 02:13 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  4
Joined  2009-03-06

Glad you like it then, Ian! I hope someone will find some time to write the Sugar. With popularity of Wordpress having a plugin like that would make Espresso even more popular, I bet.

I have no idea about creating Sugars, but seeing people’s work my idea doesn’t seem too hard. All the documentation is there, just need someone willing to spend some time on it. If a total newbie can help in the process in any way, please let me know, I would be happy to help :)


Justine

Profile
 
 
Posted: 07 March 2009 03:24 AM   [ Ignore ]   [ # 3 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

You could probably do it yourself, if you’re willing to get your hands dirty with some XML.  The auto-completion stuff is all defined via XML and text snippets, and although the documentation still needs improving taking a look at the Sugars bundled with Espresso it’s usually pretty clear.

If not, I’m sure someone will pick it up.  I’d do it myself if I weren’t so darn busy at the moment.  I’ve been meaning to take a closer look at the syntax and completion aspects of Sugars.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 07 March 2009 08:32 PM   [ Ignore ]   [ # 4 ]
Sr. Member
RankRankRankRank
Total Posts:  211
Joined  2008-11-19

Yeah, this would be great.

On a related note, I used to use (php)Eclipse for all my coding needs and it would actually parse my PHP files and pull up autocomplete for my own, custom functions. That was super cool. If a Sugar could do something even more general like that it would be amazing.

Profile
 
 
Posted: 07 March 2009 10:52 PM   [ Ignore ]   [ # 5 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

donut: Jan will need to implement that, unfortunately.  At the moment there’s no way for an XML Sugar to do it, and there isn’t any way for the Cocoa API to tie into the auto-completion system.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 16 December 2009 11:13 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  4
Joined  2009-03-06

I’ve recently came back to Espresso (thanks to the fantastic version 1.1, love the projects view ;) ) and all I’m missing is the WP functionality.

So, bumping this thread, hoping someone will pick up the idea!

Profile
 
 
Posted: 16 December 2009 11:45 PM   [ Ignore ]   [ # 7 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Hey Justine,

Adding auto-complete for WordPress methods would be a matter of editing some straight-forward XML; if this is something that’s impacting your workflow, you could definitely set it up yourself with a little bit of work.  Let us know if you need pointers or help.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 17 December 2009 12:31 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  4
Joined  2009-03-06
Ian Beck - 16 December 2009 11:45 PM

Hey Justine,

Adding auto-complete for WordPress methods would be a matter of editing some straight-forward XML; if this is something that’s impacting your workflow, you could definitely set it up yourself with a little bit of work.  Let us know if you need pointers or help.

Hi Ian, if you could tell me where to start and explain in a few words how to do it, I would be definitely interested in doing this myself. Thanks!

Profile
 
 
Posted: 24 February 2010 09:23 PM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  3
Joined  2010-02-24

I very recently switched from Coda to Espresso, and I do almost all of my web development in WordPress. I had an extension installed for Coda that did WordPress auto-completion. I missed it so much in Espresso!

I took some time and made a very basic auto-complete Sugar for WordPress template tags. I only covered the functions listed on their main Template Tags page, but I’ll be updating it soon with conditional tags and the other core functions (from their Function Reference). Also, I included the list of parameters for the “bloginfo” functions.

Anyway, you can download the Sugar here. That’s where I’ll post updated versions, too.

Hope this helps!

 Signature 

Aliso the Geek
http://alisothegeek.com/

Profile
 
 
Posted: 24 February 2010 10:22 PM   [ Ignore ]   [ # 10 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Hooray!  I’m really looking forward to trying this out; I was just wishing for a WordPress Sugar the other day again.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 26 February 2010 03:38 PM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  21
Joined  2009-01-06

Alison,
Using your WP sugar and loving it.  Thank you so much! 

Anyone know how to get this sugar posted on Coffeehouse?

Profile
 
 
Posted: 26 February 2010 05:37 PM   [ Ignore ]   [ # 12 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28
kerch - 26 February 2010 03:38 PM
Anyone know how to get this sugar posted on Coffeehouse?

Someone (preferably Alison to potentially allow editing it down the road) just needs to submit it.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 01 March 2010 04:48 AM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  3
Joined  2010-02-24

Hello everyone,

I’ve posted an updated Sugar on my website. I included all the functions in the Function Reference (which includes conditional tags) and added some snippets. I also fixed the weird behavior the autocomplete was having after typing underscores (either not continuing to complete, or starting the match all over again).

I registered on the Coffee House, and then saw I needed to register with GitHub as well. I set up an open source account, but I’m pretty new at using repositories and don’t exactly know what to do from there. If anyone can give me some pointers, it would be much appreciated!

Thanks,
Alison

 Signature 

Aliso the Geek
http://alisothegeek.com/

Profile
 
 
Posted: 01 March 2010 06:02 PM   [ Ignore ]   [ # 14 ]
Moderator
RankRankRankRank
Total Posts:  984
Joined  2008-10-28

Hosting the Sugar on GitHub isn’t really necessary to post it to CoffeeHouse (or at least it wasn’t previously; you just had to enter a download URL and leave the GitHub stuff blank).  Sticking it up on GitHub is a nice way to keep the code version controlled and allow people to change it themselves and submit the changes back to you, though, so if you want to host it there I definitely recommend it.

Probably the best intro to git and GitHub you’ll find is GitHub’s help section.  There’s also numerous free resources online to help you get up and running with git, like the free git book.  Good luck!  Let us know if you have any specific questions.

 Signature 

Ian Beck
MacRabbit Support

My stuff:
TEA (docs / source) .:. Spice.sugar .:. HTMLBundle.sugar .:. Quiet Light & Earthworm

Profile
 
 
Posted: 06 March 2010 10:20 AM   [ Ignore ]   [ # 15 ]
Newbie
Rank
Total Posts:  7
Joined  2010-02-05

Thanks, this will be very helpful to me!

Profile