Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excerpt from another page
#1
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
Reply
#2
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
You can bodge it with <?php getPageContent('slug'); ?> in a div of fixed size with overflow: hidden; in the css.
Reply
#4
heh clever, even better use css3 ellipsis

http://davidwalsh.name/css-ellipsis
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
@D.O.

There's a plugin in Extend: Pages Excerpts
Reply
#6
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
Reply
#7
maybe you forgot to include the plugin on the plugins page
Reply
#8
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
Reply
#9
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#10
(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
Reply
#11
@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
Reply
#12
(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
Reply
#13
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 ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#14
@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
Reply
#15
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
Reply
#16
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);
Reply
#17
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
Reply




Users browsing this thread: 4 Guest(s)