Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coherent API and no echos.
#1
I would like to request that functions in GS either don't echo things or receive a parameter that prevents echoing text to the browser.

Echoing the content, either if it's a menu, a page excerpt or any other thing prevents me from using the existing functions to extend GS. I end up rewriting existing functions and duplicating code.

One thing that's always bother me, but it may be due to my Java background, is that a function that starts with "get" is expected to return a value, not show it to the user. I want to get a page excerpt, I look for a function that does that and behold, the darn thing echos the text instead or returning it to me, as I would expect Sad

Does my requests make sense or I'm I the only one that feels awkward using "gets" that don't return and being unable to use the functions in the CMS and having to constantly duplicate the existing code?

EDIT:
And this forum system keeps cutting messages in half....
Rejoice! For very bad things are about to happen.
Reply
#2
If you ask only for page excerpts, you were not the only one Smile
Look at page excerpts plugin, this might come in handy for you
http://get-simple.info/extend/plugin/pages-excerpts/62/
Addons: blue business theme, Online Visitors, Notepad
Reply
#3
Thanks for the link but I ended up creating my own function as it suited my needs a bit better and it's easier to maintain it along side the rest of my code/plugins.

But I would really like to have the echoing thing removed, I understand it's easy to just echo the all content instead of requesting that in some other place but it really prevents the use of some functions. The excerpt is just an example, if GS already provides a function to get excerpts why can't it be used to further process the created excerpt? Doesn't make sense to me an API that can't really be used due to such a simple thing.
Rejoice! For very bad things are about to happen.
Reply
#4
Knitter Wrote:EDIT:
And this forum system keeps cutting messages in half....

I have a suspicion that if I put a double quote in here...

"

..it'll be fine because I've answered the anti-bot question. If I hadn't then it would truncate this message there...

EDIT:
Ten seconds later, yes. If you are asked the question the message gets truncated, otherwise you're fine.

The ticket at http://punbb.informer.com/trac/ticket/360 links to a couple of threads on the problem.
Reply
#5
Thenks for finding that link Vulch... disabled stop bots according to this post... we will see what happens. http://punbb.informer.com/forums/topic/2...-messages/
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply




Users browsing this thread: 1 Guest(s)