Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-04-14 19:03:26

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: I make new, what is wrong?

global $smilies has to be declared outside function as well.


Plugin Composer — admin plugin to write your own plugins

Offline

#26 2006-04-14 19:17:28

[CPR]-AL.exe
Member
From: Moscow
Registered: 2006-04-07
Posts: 18
Website

Re: I make new, what is wrong?

But in the code, that I’ve posted it’s declared outside the function… could you show me the exact way to do that, please?..


There are 10 types of people in the world – those who understand binary and those who don’t.

Offline

#27 2006-04-14 19:55:07

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: I make new, what is wrong?

Just declare it at the very beginning of your code, then declare it within the function too. I mean global
BTW, you should be careful about doing such things as declaring a global variable not to make a conflict in textpattern, and perhaps it is better to avoid doing so in a general case.

EDIT: update the plugin, I’ve shown how that should be done (without globals).

Last edited by Inspired (2006-04-14 21:00:17)


Plugin Composer — admin plugin to write your own plugins

Offline

#28 2006-04-16 17:29:03

[CPR]-AL.exe
Member
From: Moscow
Registered: 2006-04-07
Posts: 18
Website

Re: I make new, what is wrong?

Oh, that’s a nice one =) Thank you so much! ;)


There are 10 types of people in the world – those who understand binary and those who don’t.

Offline

#29 2006-04-18 15:33:16

[CPR]-AL.exe
Member
From: Moscow
Registered: 2006-04-07
Posts: 18
Website

Re: I make new, what is wrong?

I know, that I’m too insolent, but is there a way to create a plugin, that will render the text like this:

< txp:render_smileys > text =))) bla-bla =) < /txp:render_smileys >

It could be very useful in some cases… ;)

Last edited by [CPR]-AL.exe (2006-04-19 19:10:07)


There are 10 types of people in the world – those who understand binary and those who don’t.

Offline

#30 2006-08-08 18:12:02

wordgasm
Member
Registered: 2006-05-17
Posts: 83
Website

Re: I make new, what is wrong?

I have a question: how do I embed the smileys on the article? I have the plugin and it works great. one thing though — they don’t show up in feeds. in other words, when you click “preview” in the Write Tab, it’s shown in text as in :smiley:, not an image… I’m into feedfetchers and my readers are in it too.. but when the feeds are fetched, the smileys just wont show up.. is there any code to alter this? how come wordpress can do that? can txp do that too?o_0

Offline

#31 2006-08-08 18:47:26

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: I make new, what is wrong?

Oh, well, I guess this will require you to enter smiles without shortcuts to make them appear as images in an rss. The only thing that comes to my mind now is to use some rich text solution (tinyMCE), that will insert smiles as smiles… or messing with rss.php and atom.php


Plugin Composer — admin plugin to write your own plugins

Offline

Board footer

Powered by FluxBB