Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
display page excerpt - plugin
#1
I've finally accomplished creating a plugin to grab declared's page excerpt, and show its content on another page.

Syntax:
All you have to do is to launch the plugin inside your template, or inside a component box (which is more comfortable) along with 1 or 2 arguments.
1st argument is a name of the page (its file/URL) whose content you want to load (don't forget about commas)
2nd argument is the amount of chars you want to display. Default amount is 200, thus if you don't set the value it will just show 200 first chars.

Example of showing 60 first chars from index page:
Code:
<?php show_page_excerpt("index",60) ?>


Error handling:
if you use a non existing page, you will be notified about that.


additional notes:
- If page's content will be shorter than amount of text you want to display, a "read more" link to page won't be displayed.

- this plugin stripes whole html tags along with images, thus it shows only plain text




ps. this is my first attempt to create a plugin. I think it works great, and can be a nice addon to a webpage. I used it on www.tkaczjanik.pl website, to display 2 excerpts of pages placing them inside boxes on the right side.

Let me know if you find a bug, as I won't publish it on GS website until I am sure it won't blow out user's GS instance Wink
Addons: blue business theme, Online Visitors, Notepad
Reply


Messages In This Thread
display page excerpt - plugin - by yojoe - 2010-11-18, 23:36:21
RE: display page excerpt - plugin - by wakh - 2014-03-06, 02:25:44
RE: display page excerpt - plugin - by shawn_a - 2014-03-06, 02:39:23
RE: display page excerpt - plugin - by hameau - 2014-03-07, 21:07:47
RE: display page excerpt - plugin - by datiswous - 2014-03-08, 02:13:03
RE: display page excerpt - plugin - by wakh - 2014-03-07, 23:11:00
RE: display page excerpt - plugin - by bluzer - 2015-07-13, 01:07:17
display page excerpt - plugin - by arthur_a_keen - 2010-11-19, 00:11:49
display page excerpt - plugin - by yojoe - 2010-11-19, 01:17:27
display page excerpt - plugin - by Oleg06 - 2010-11-26, 23:54:34
display page excerpt - plugin - by yojoe - 2010-11-27, 02:10:55
display page excerpt - plugin - by p01 - 2010-12-05, 01:05:04
display page excerpt - plugin - by Oleg06 - 2010-12-05, 02:41:59
display page excerpt - plugin - by p01 - 2010-12-05, 03:10:11
display page excerpt - plugin - by Oleg06 - 2010-12-05, 03:37:30
display page excerpt - plugin - by yojoe - 2010-12-06, 06:11:56
display page excerpt - plugin - by p01 - 2010-12-06, 22:04:21
display page excerpt - plugin - by Cottser - 2010-12-22, 03:50:21
display page excerpt - plugin - by Oleg06 - 2011-06-08, 20:19:28
display page excerpt - plugin - by yojoe - 2011-06-08, 21:35:19
display page excerpt - plugin - by Oleg06 - 2011-06-08, 22:06:42
display page excerpt - plugin - by Texta - 2011-06-18, 01:14:53
display page excerpt - plugin - by lanooz - 2011-07-21, 09:24:59
display page excerpt - plugin - by sausage - 2011-09-26, 03:49:39
display page excerpt - plugin - by Connie - 2011-09-26, 04:00:16
display page excerpt - plugin - by Ampersand - 2011-11-02, 01:30:25
display page excerpt - plugin - by Johonwayni - 2011-11-12, 01:32:07
display page excerpt - plugin - by Dominic - 2012-02-02, 12:40:32
display page excerpt - plugin - by yurifanboy - 2012-02-02, 14:30:08



Users browsing this thread: 1 Guest(s)