Posts: 321
Threads: 15
Joined: Feb 2012
Is there a way to show the excerpt in my index page from another page named example "article" ?
<?php get_page_excerpt (510, article); ?>
My website made with GetSimple CMS is
Arte & Società
www.artesocieta.eu
An indipendent website about Italian Contemporary Visual Arts
Posts: 6,266
Threads: 181
Joined: Sep 2011
You would have to write your own function or maybe a i18n plugin can do this.
We really need to add some more theme_functions to core.
Posts: 1,127
Threads: 136
Joined: Feb 2012
You can bodge it with <?php getPageContent('slug'); ?> in a div of fixed size with overflow: hidden; in the css.
Posts: 6,266
Threads: 181
Joined: Sep 2011
heh clever, even better use css3 ellipsis
http://davidwalsh.name/css-ellipsis
Posts: 3,491
Threads: 106
Joined: Mar 2010
@D.O.
There's a plugin in Extend: Pages Excerpts
Posts: 321
Threads: 15
Joined: Feb 2012
Hi to all and thanks as always for your help.
I tried with "getPageContent" & "overflow:hidden" and it is ok.
Sadly instead "Pages Excerpts" plugin doesn't work with the recent version of GS.
Thanks anyway to you all!
My website made with GetSimple CMS is
Arte & Società
www.artesocieta.eu
An indipendent website about Italian Contemporary Visual Arts
Posts: 1,928
Threads: 88
Joined: Apr 2010
maybe you forgot to include the plugin on the plugins page
Posts: 321
Threads: 15
Joined: Feb 2012
2013-03-15, 23:06:53
(This post was last modified: 2013-03-15, 23:16:08 by D.O..)
No!! I downloaded it, uploaded on my server and actived the plugin. Sadly, It doesn't work.
Fatal error: Call to undefined function mb_substr() in D:\Inetpub\webs\my_site\plugins\pages-excerpts.php on line 72
Any help?
(2013-03-15, 07:29:14)Oleg06 Wrote: maybe you forgot to include the plugin on the plugins page
My website made with GetSimple CMS is
Arte & Società
www.artesocieta.eu
An indipendent website about Italian Contemporary Visual Arts
Posts: 6,266
Threads: 181
Joined: Sep 2011
Your server does not support multibyte functions. Very strange.
You can ask your host why not, or have them fix it.
Or patch the plugin with a function exists check and add your own alternative.
Posts: 1,204
Threads: 30
Joined: Jun 2010
(2013-03-15, 23:06:53)D.O. Wrote: Fatal error: Call to undefined function mb_substr() in D:\Inetpub\webs\my_site\plugins\pages-excerpts.php on line 72
Any help? As Shawn mentioned: blame your sh$&(#@! hosting provider, not a plugin.
Hosting w/o enabled mb_substr is a nightmare for operating on content with special chars.
Try to change mb_substr to substr on line 72 in plugin's source code.
But don't count that special characters won't lead to strange behaviour while using this plugin.
Addons: blue business theme, Online Visitors, Notepad
Posts: 321
Threads: 15
Joined: Feb 2012
2013-04-02, 03:02:43
(This post was last modified: 2013-04-02, 10:04:03 by D.O..)
@shawn_a: Yes it doesn't support multibyte functions. I have had the same problem with NewsManager. Thanks anyway.
@yojoe: Okay, blame my hosting provider (btw it's very popular in Italy), but why YOU (the author of this plugin) don't try to resolve this bug at least ?
My website made with GetSimple CMS is
Arte & Società
www.artesocieta.eu
An indipendent website about Italian Contemporary Visual Arts
Posts: 1,204
Threads: 30
Joined: Jun 2010
(2013-04-02, 03:02:43)D.O. Wrote: @yojoe: Okay, blame my hosting provider (btw it's very popular in Italy), but why YOU (the author of this plugin) don't try to resolve this bug at least ?
Because that's not a bug. That's neither a feature.
That's a commonly used function by webdevelopers.
And as webdevs do not spend time on adjusting websites to operate with 10yrs old IE6 browser because that's a nonsense, I wont' loose time on finding out why a simple plugin which operates on at least 3 webhosting provieders (I've tested on polish, german, french) do not work on an old fashioned italian hosting provider.
Force your webhost provider to make your up to date application work.
You pay them for it !
Addons: blue business theme, Online Visitors, Notepad
Posts: 6,266
Threads: 181
Joined: Sep 2011
Getsimple is multibyte meaning it supports multiple languages, it is surprising a host does not have these enabled by default, have you tried having them turn them on ?
Posts: 321
Threads: 15
Joined: Feb 2012
2013-04-09, 14:20:07
(This post was last modified: 2013-04-09, 14:42:44 by D.O..)
@yojoe
Yes, of course I pay them, so no worries I will resolve it in this way.
All in all, I can't claim anything from a free plugin! So, thanks anyway for your work!
However, I notice a certain "contemptuous" tone in your words... not nice! This "old fashioned" Italian hosting provider, that you despise so much, allowed me to deal with an attack by Alex Polyakov (another dude from the East like u, so I bet u should know him, huh?).
So, no matter if your small 5kb plugin doesn't work! Thanks anyway!
@shawn_a
In fact I am surprised too. I will test it on other kind of severs (this one is a II7) when I will have much free time. I will let you know. Thanks anyway Shawn!
My website made with GetSimple CMS is
Arte & Società
www.artesocieta.eu
An indipendent website about Italian Contemporary Visual Arts
Posts: 1,204
Threads: 30
Joined: Jun 2010
I provided a possible solution in earlier post: http://get-simple.info/forums/showthread...8#pid34598
Have you tried it at least ?
ps. I'm in no way related with Alex P, have no idea who this guy is, nor even interested in knowing.
Addons: blue business theme, Online Visitors, Notepad
Posts: 3,491
Threads: 106
Joined: Mar 2010
yojoe's suggested solution should work, but if you want to make the plugin work for servers with or without mb support, change line 72 to:
Code: $excerpt = function_exists('mb_substr')? mb_substr($excerpt, 0, $chars, 'UTF-8') : substr($excerpt, 0, $chars);
Posts: 321
Threads: 15
Joined: Feb 2012
Thanks Carlos aka "The Closer"!
Now it works even for the "old fashioned italian hosting provider" (LMAO!)... Now I can see perfectly the excerpts of every page but sadly the link to the complete page doesn't work. But it's surely a big step! Thanks!
My website made with GetSimple CMS is
Arte & Società
www.artesocieta.eu
An indipendent website about Italian Contemporary Visual Arts
|