PageView Plugin

Apr 14, 2005 | Tags: , , | Written by John

PageView is a plugin that will display another web page inside the current post. This is achieved with the use of an iframe - an HTML tag that allows a webpage to be displayed inline with the current page. Although an iframe can lead to a complicated website, it can be very effective when used appropriately.

Installation

  1. Download pageview.zip
  2. Unzip
  3. Copy to your /wp-content/plugins directory
  4. Activate plugin

You can find full details of installing a plugin on the plugin installation page.

Usage

No sniplet called example

An example is shown below:

[pageview / "Urban Giraffe" A blog within a blog!]
Share This

Comments

  1. author
    RaynerApe :

    Apr 16, 2005 11:01 am

    Excellent plugin!
    When I first read about it at WordPress Plugin DB, I thought to myself, how is this better than EZStatic? I didn't know it wasn't about putting static HTML inside template but inside posts - a truly unique solution. I love it.

    By the way, can you modify the plugin to accept also height and weight for the inline frame? The default are pretty small.

  2. author
    RaynerApe :

    Apr 16, 2005 11:03 am

    Oh, also please add the example to the plugin description as shown in the admin panel so poeple don't forget the format required.

  3. John (author) :

    Apr 16, 2005 11:53 am

    I've updated the plugin to include usage instructions in the plugin page. You can modify the dimensions of the frame by changing the CSS style. I've added a couple of details about this here on the page.

  4. Mathias Bynens :

    Apr 16, 2005 2:20 pm

    A more WordPress way of embedding a page within another page, would be through the use of object, like this:

    <object data="/include/adsense.php"></object>

  5. Mathias Bynens :

    Apr 16, 2005 2:27 pm

    Oh, and instead of those horrible iframes for code insertions, you could have used the pre tag with some spiffy CSS. Or -- even better -- Code Tag Transformations.

  6. John (author) :

    Apr 16, 2005 2:55 pm

    Thanks Mathias. Yep, I spotted the object tag a few hours back and thought I was safe at least until tomorrow!

    The pre tag is fine for small bursts of code, but I created the plugin so as not to clutter up a post with a lot of code. I will investigate the Code Tag Transformation plugin further though - it certainly looks very pretty.

  7. Shane :

    Apr 23, 2005 3:25 pm

    Excellent. :) No words can explain how usefull this is. :)

  8. George :

    Aug 2, 2005 6:29 pm

    Hi... Yes indeed, this is a very useful plugin... thanks a lot. Pardon my ignorance, but i just have to make this question if i want this plugin to work on my website:
    Where do i paste the css code?? at the end of the style.css file? or at the beggining? (if it helps, i'm using the pool theme)

    Thanks for any infor regarding that!!!

  9. John (author) :

    Aug 3, 2005 10:10 pm

    The CSS code can go anywhere in your style.css file - doesn't matter if it's the end or the beginning.

  10. Brian G :

    Aug 25, 2005 7:36 am

    Great Plug-in, this will make my site look more professional! I found a small bug, if you’re using John’s giraffe theme editor plug-in and one changes anything within it the pageview window is reduced in size and looks really bad. I found that if you input the required CSS code into the style.css in the giraffe plugin folder not in the theme’s folder the problem is fixed. It would be great if john includes this in his next version of giraffe’s plug-in.
    Thanks

  11. John (author) :

    Aug 27, 2005 5:45 am

    I've updated the Giraffe theme (1.17) so that you can now add CSS styles into 'extra.css' (in the giraffe theme directory). This means you can put the PageView styles, as well as any others you want, and they will be included as additional styles and will not be deleted by the Giraffe theme editor.

  12. Allison :

    Aug 27, 2005 10:48 am

    I have been looking for a code like this. I have done everything instructed however nothing shows up when I add the code to a post. I am not sure I am writing it right?? I cut and paste, changed the url.. but nothing is showing up.

    I have added the codes to the CSS.. the plugin is activated.. what am I missing??

  13. John (author) :

    Aug 27, 2005 1:10 pm

    Can you post it here (or in the 'contact me' page) so I can have a look if you've typed anything wrong? Also, double-check that the plugin is activated in the WordPress admin section. If you move files about a plugin can get automatically disabled.

  14. author
    hAiRiL :

    Sep 16, 2005 8:28 pm

    i used the code and everything works fine, except for the fact that i can't get the title to show. the description is ok however. perhaps you could show me what you used for your example above?

    eh?

  15. author
    hAiRiL :

    Sep 16, 2005 8:32 pm

    <!-- pageview url UrbanGiraffe A blog within a blog! -->

  16. author
    hAiRiL :

    Sep 16, 2005 8:33 pm

    sorry for flooding. tried typing the codes, but it was catched i think -_-"

  17. John (author) :

    Sep 22, 2005 12:02 pm

    The code is:

    <!-- pageview / UrbanGiraffe A blog within a blog!-->

  18. Gerard :

    Oct 22, 2005 1:03 pm

    I would like to include huge pages, both in width and in heighth. I failed, you can have a laugh at it here: http://www.i-dentities.info/articles/id-test. Problem no. 1 is my three column theme. Using margin -100px didn't help me. Problem no.2: how do I change the heighth of the iframe to the length of any article I'd like to include?

  19. John (author) :

    Oct 23, 2005 5:27 am

    1) Specify the width as a percentage to fit into your column
    2) Don't give any value for the height. This will cause the iframe to be as tall as it needs to be.

  20. author
    jon :

    Nov 1, 2005 1:41 pm

    hmm. i have scott reilly's "auto-link URLs" plugin and it keeps translating my pageview url, thus breaking it :( i'd like to keep the auto-linking though... could someone briefly explain the "object data" method of page inclusion?

  21. author
    jon :

    Nov 2, 2005 2:12 pm

    i mean, i read up on object data embedding, but if anyone could provide hints how use it to include a page in wordpress, that would be great. thanks :)

  22. John (author) :

    Nov 3, 2005 6:01 am

    By object embedding, do you mean this?

  23. Walt :

    Jan 8, 2006 10:30 am

    Thanks job for putting this plugin together. It will be quite useful once I get it going. I am by no means a programmer, but I'd like to think I can be resourceful when I have to be, to figure something out. So I looked at your plugin code to maybe get a better idea or what I am doing wrong or a better idea of what this plugin expects from me when I use the for example, how does the plugin differentiate URL, from the title, from the description in order to separate them into the proper strings? Are there separators I am missing? I was thinking maybe the strings are separated by spaces, but then your description has multiple spaces. And then what if you wanted your title to be multi-word with one or more spaces? Are the strings comma separated? I must be missing something. Thanks again John. :-)

  24. Walt :

    Jan 8, 2006 10:32 am

    Sorry I forgot to mention... I recently upgraded to wordpress 2.0. Do you know if that might be an issue with this plugin? How about with the UrbanGiraffe theme, which by the way is very slick and quite robust. Thank you for that too.

  25. John (author) :

    Jan 27, 2006 1:52 am

    Hi Walt,

    A URL cannot contain spaces so that is treated as 1 word. Currently the title cannot contain spaces, so that is also 1 word. The description is everything else after the title and so can contain spaces and many words.

    I don't think there will be any issue with the plugin and 2.0 - the plugin is very simple and doesn't use any advanced functions.

  26. author
    Dana :

    Mar 12, 2006 10:45 pm

    Nice plugin works perfectly with 2.2.

  27. author
    galfn :

    Mar 20, 2006 2:28 am

    When I use your CSS in this page, the display is not the same with your example in this page. Can you give my your example CSS? Many thanks.

  28. John (author) :

    Mar 20, 2006 2:42 am

    http://www.urbangiraffe.com/wp-content/pageview.css

  29. Firdaus :

    May 12, 2006 9:34 pm

    Hi, i'm new plugin user having problem.

    I'm trying to publish this page:
    http://www.dakwah.info/wp-content/themes/prozac/koleksi.html

    at:
    http://www.dakwah.info/v2/?page_id=31

    and i use the code:
    <!-- pageview http://www.dakwah.info/wp-content/themes/prozac/koleksi.html Koleksi Buku -->

    Could please help me!

  30. John (author) :

    May 16, 2006 1:17 am

    The code looks fine, other than the URL doesn't exist!

  31. Manuel :

    May 19, 2006 5:30 am

    GReat Plugin mate, one question im using K2 theme and i want to put a hole page within the blog as @gerard, the problem is that the iframe doesn scroll and doesnt fit in all the page i want to test, need some advice. you can see it right here: http://www.enlaces-digitales.com/?page_id=3 (at the bottom ;) ) Cheers!

  32. John (author) :

    May 23, 2006 11:48 pm

    Manuel, I can't see any iframe on your page! You must use some CSS styles to change the dimensions of the iframe (see above).

  33. author
    aNgGaCKt :

    Jun 2, 2006 4:14 am

    Dear John,

    At first when i installed your plugin, there was no problem at all, it all works like a magic to me :)
    And then i tried to implemented it in my wordpress' page, and it works like a magic too :D
    And then, here comes the real trouble, after i press the "home" link, everything suddenly turns white. Just white, including the page with your plugin embedded too. The only page that works pretty well is only the admin page. I tried to deactivate, delete and reinstall your plugin, but it totally not works. I also clear every cache and cookies and it failed too.

    I really dunno what happened, 'coz, before i click the "home" link, everything was fine.

    And one buddy of mine check it and said, it was all becoz of your plugin , he said your plugin broke the wordpress installation and i have to re-install the wordpress once again.

    I didnt mean to say that your plugin is buggy, i just curious, is it true, that sometimes in a very rare condition, this thing might happened? 'coz i have seen one site that use your plugin works like a charm.

    For your information, i tried to embed pafiledb into my wordpress' page. Is it happened only when someone tried to use your plugin with pafiledb?

    Best Regard

  34. John (author) :

    Jun 13, 2006 10:04 pm

    No, it's not possible for the plugin to break a Wordpress installation. All it does is replace text when WordPress displays a page. No changes are made to files or the database

  35. Gregg :

    Jun 28, 2006 10:25 am

    I cannot figure out how to change the width on my i-frame

    I am using the Kubrick theme and add

    .stretch {
    width: 100%;
    }

    to the styles.css page through the theme editor.

    Then I use

    It opens the page at the default size. Please could someone spot what I am doing wrong.

    Thanks

  36. author
    golffee :

    Jun 28, 2006 7:16 pm

    i have problem in this - http://www.pressjargon.org/?p=218 - don't show your icon (pageview.gif) on the upper-left conner. And may i adjust width of web page?

    thank for your kind from Thailand :) wish u back again.

  37. John (author) :

    Jun 30, 2006 1:15 am

    gregg: Look at the styles in pageview.css that's in the plugin's zip (added recently, so you may have an older version)

    golffee: Do you have the latest version from this page? Your icon is referring to /wp-content/pageview/pageview.gif, but the latest plugin is pointing at /wp-content/plugins/pageview/pageview.gif

  38. author
    Alba :

    Aug 15, 2006 9:31 am

    Hi, I've just dowloaded you plugin here today, but I can't see any pageview.css in the plugin's zip. As my icon's referring to /wp-content/pageview/pageview.gif too, I think the version available for download may not be the latest. Am I wrong ?
    Thanks.

  39. John (author) :

    Aug 16, 2006 1:50 am

    That is correct. The one there now is the real latest version. Thanks!

  40. author
    Alba :

    Aug 17, 2006 11:29 am

    Thanks to you ! It works beautifully. :-)

  41. Bex :

    Aug 18, 2006 8:05 am

    Hey, I'm trying to use the code on this page of my site (http://book-of-shadow.net/arachnes-web/portfolio/) and nothing shows up. This is the code I'm using:

    The plugin has been activated in the WP admin.

  42. Bex :

    Aug 18, 2006 8:08 am

    Let's try that code again

    (except I am using the double hyphens)

  43. Bex :

    Aug 18, 2006 8:09 am

    bah!

    pageview http://dumbandjaded.net dumbandjaded my personal blog

    with the proper containing characters

  44. John (author) :

    Aug 21, 2006 2:43 am

    Did you get it working Bex? I took a look at your link and it seems to be working now.

  45. Brandon :

    Sep 29, 2006 6:18 pm

    I'm having issues. I'm trying to add in a static page: http://brandonplank.com/site/djsets-mixes.htm, so I entered the code on the page like this:

    What I get is the index.htm file from my site and "/site/djsets-mixes.htm" as title.

    Am I doing this wrong or can the plug in not do what I want it to?

    Here's what it looks like in my WP: http://brandonplank.com/site/?page_id=9

  46. joghurtKULTUR :

    Oct 3, 2006 4:11 am

    great plugin, i will use it to promote new websites in my blog

  47. Bill Toole :

    Oct 13, 2006 5:35 pm

    I've been trying to modify the pageview.css file to create a larger iframe to no avail.

    Page in question : http://billtoole.net/wordpress/?page_id=88

    Any suggestions ? Theme is Hemmingway.

    Thanks !

  48. Bill Toole :

    Oct 14, 2006 2:08 pm

    Never mind - figured it out. Copied pageview.css into style.css, changed a couple of parameters and trimmed gif to 2 pixels. Works great ! Dou xie !

  49. Orlando :

    Oct 26, 2006 5:09 pm

    Hi John,

    xml parsing error using WP 2.04.

    Any clue? Thks!

  50. John (author) :

    Oct 30, 2006 12:18 am

    It looks like you've put an <a href="something"> as the URL instead of just the URL.

  51. author
    Henrik :

    Jan 15, 2007 6:54 am

    Is it possible to remove the header with the icon (and the frame around)?

  52. John (author) :

    Mar 2, 2007 4:17 am

    Yes, the HTML code is stored in wp-content/plugins/pageview/view/default/pageview.php. You can either edit it there, or create a directory 'view/pageview' in your theme, copy the above file there, and modify it on a theme-by-theme basis (you'll need version 1.3 for that)

  53. Graeme Findlay :

    Sep 24, 2007 3:10 am

    Any ideas as to why my iframe URLs always get broken and become [[[1]]] instead of the proper URL?

  54. John (author) :

    Sep 24, 2007 9:39 pm

    Can you post the exact tag you are inserting into a post, Graeme, and I'll see what happens for me.

  55. author
    tjestr :

    Oct 20, 2007 5:17 pm

    Hello John,
    great plugin. thanks for that.
    the only thing i can't get working is how and where to define the width and higth of the iframes.

  56. John (author) :

    Oct 23, 2007 10:06 pm

    tjestr, you should defined the height and width in the pageview.css file that is included with the plugin in version 1.4

  57. Graeme Findlay :

    Oct 24, 2007 2:47 am

    Sorry for not answering sooner. Still having problems with this. ANY url I use comes back to [[[1]]] and with the 1.4 version of your plugin, the tag doesn't even get converted to an iframe, it just stays as a comment tag.

    [code][/code]

    becomes

    [code][/code]

    Any ideas? (I put the extra spaces next to the to stop them being converted here)

  58. author
    tjestr :

    Oct 24, 2007 3:29 am

    Hello John,
    now i get the following error code: Rendering of template pageview.php failed
    Here is the site i'm running: http://kite.soololi.de/wordpress/

  59. Annelies :

    Oct 24, 2007 7:11 am

    I have the same problem as tjestr. How can I solve this?

  60. John (author) :

    Oct 25, 2007 9:12 pm

    Graeme, are you using the WordPress visual editor? If you are, it's likely that it may be mangling the code. I've updated the plugin to use a different tag which won't be affected by visual editors.

  61. Graeme Findlay :

    Oct 25, 2007 10:14 pm

    Not using the visual editor, but your solution of changing the tag worked.

    However, I have another issue. Now that it's doing the right interpretation of the tag, the URL is cocked up a little.. The output is coming up as:

    (I've added the "-" after the "

    Title:
    http://bytor.co.uk/photo-gallery/showcase&quot; >Testing

    Description:
    Test Description

    http://bytor.co.uk/photo-gallery/showcase&quot; frameborder="0" >Get a better browser!

  62. author
    tjestr :

    Oct 26, 2007 5:26 am

    The tag changing a bit, but if you just type a single word in the desciption the code instead of the iframe shows up. And the url gets screwed up too.

    Code: [pageview http://www.heise.de/ "heise.de" heise]
    Url: http://kite.soololi.de/wordpress/

  63. John (author) :

    Oct 31, 2007 12:58 am

    I've fixed some more problems with WP auto formatting functions. Hopefully this will take care of all outstanding issues.

  64. Graeme Findlay :

    Oct 31, 2007 7:46 am

    Sadly, nope. Check http://bytor.co.uk/pvt to see what's happening now.

    The tag is `[pageview http://bytor.co.uk/photo-gallery/showcase "Testing" Test Description]`

  65. Annelies :

    Oct 31, 2007 9:28 am

    I have the same problem as Graeme.

  66. Steve :

    Nov 1, 2007 6:12 pm

    Hi

    Love your work....

    I'm sure if there is a good reason, but why don't you use the Exec-PHP plugin and enter the following into the post/page

    require 'page.php';
    ?>

    It works for me :)
    Steve

  67. Benjamin :

    Nov 4, 2007 9:38 pm

    http://benjaminlim.net/blog/?page_id=6

    wont allow url with '-' or '/'

  68. John (author) :

    Nov 5, 2007 9:11 pm

    Fixed in latest release.

    Not sure what you mean Steve?

  69. Graeme Findlay :

    Nov 6, 2007 9:14 am

    Using v1.4.3 and its still cacked :(

  70. Kimmo :

    Nov 6, 2007 10:22 am

    For me it acts really weird...I am using TinyMCE so maybe it has something to do with it...
    but when I use

    [pageview http://west1.vallema.com "Standings" This is where our team RUNNERS currently stands in the Dutch Leage (probably 5th level down from the top)]

    the result is that the word com becomes the title and the rest won't work anymore since it can't find west1.vallema -address (missing the .com)

    any help would be appreciated...

    cheers,
    Kimmo

  71. John (author) :

    Nov 7, 2007 8:47 pm

    Kimmo, are you sure you are using the latest version? I tried the exact same tag and it worked fine (actually I noticed some spurious quote marks, which have now been removed).

    Same for you too Graeme, I have your tag in my test site and the plugin displays the page. I've tried this with both TinyMCE and without and the same thing.

  72. Steve :

    Nov 8, 2007 6:18 am

    Hi

    I used the plugin from . This allowed me to use php script within the posts or pages..... as it says on their website ' The Exec-PHP plugin executes <?php ?> code in your posts, pages and text widgets.

    Then I simply used the php REQUIRE or INCLUDE command ... example:-


    <?php
    require 'http://www.yourwebpage.com/page.php';
    ?>

    Cheers

    Steve

  73. John (author) :

    Nov 8, 2007 6:27 am

    Steve, that's a very different method and puts a lot of load on your website - everytime the page is displayed your webserver has to go and downloaded the external page. This is very inefficient and on a busy page could soon kill your site.

    Also, I have a competing plugin called Sniplets, which works around this problem.

  74. Graeme Findlay :

    Nov 8, 2007 7:49 am

    Dammit! I've found the problem...

    I have been using the latest plugin all the way through this, but it turns out another plugin has been rewriting your URL, along with a couple of other things (just updated that plugin recently :()

    The offender is http://zechs.dyndns.org/wordpress/?page_id=126 "MediaWiki Markup for WordPress" v0.0.6-r3. I never saw this behaviour with v0.0.6-r2 so I may go back to that.

    Sorry for giving you the runaround. Should be beating up that other author ;)

  75. Kimmo :

    Nov 8, 2007 6:23 pm

    Hey John,

    Thanks...I've updated to the latest version and it works now fine.

    cheers,
    Kimmo

  76. steve :

    Nov 9, 2007 3:48 am

    Hi

    Is there a working demo of PageView that i can take a look at.

    Regards

    Steve

  77. John (author) :

    Nov 12, 2007 8:39 pm

    Steve, see above

  78. dmx-moteur :

    Dec 18, 2007 9:34 am

    I tried to use this plugin with Wordpress 2.3.1 and it doesn't work at all !
    Here is my code I insert in the page post (code textfield) :
    [pageview http://dreamgratuit.canalblog.com "Dreamgratuit" Extensions et tutoriaux pour Dreamweaver]

    Did I do something wrong ?

  79. dmx-moteur :

    Dec 18, 2007 10:27 am

    I tried to disable some other plugin and now it's OK but sometimes I have trouble with my Apache Server (Wordpress is at this time running on my dev server, "localhost" with EasyPHP. Maybe the reason why ?).

    I also tried to hide the pageviewhead using the CSS property visibility:hidden instead of the 5 lines in the original code but there is still the table in the code and a white space on the page. Is there a way to delete this white space ?

  80. John (author) :

    Dec 19, 2007 12:22 am

    DMX, use display: none instead

  81. Waremock :

    Dec 24, 2007 8:11 am

    What do I need to do in order to make it show the entire site. It only shows a portion of it with the scroll bar. What do i need to add in pageview.php?

  82. John (author) :

    Dec 31, 2007 12:21 am

    You need to modify pageview.css in the plugin directory and add a specific height:

    div.pageview
    {
    height: 200px;
    }

    Alternatively you can add this to style.css in your theme.

  83. Steve :

    Jan 4, 2008 12:12 pm

    Hi John,
    As you stated, the code below changes the length of the iframe. is there a way for the iframe to dynamically adjust to the length of iframed webpage as the pages of the iframed webpage change length? I'm trying to achieve the seamless look.

    div.pageview
    {
    height: 200px;
    }

    Thanks!
    Steve

  84. John (author) :

    Jan 7, 2008 4:07 am

    Steve, it's not something you can do through CSS and instead you'll have to resort to some JavaScript code. Take a look here for some more details.

  85. jsarber :

    Jan 29, 2008 3:54 pm

    On my blog, it redirects to the webpage rather than presenting it in the frame. What's wrong?

  86. John (author) :

    Jan 30, 2008 10:02 pm

    jsarber, what redirects to the front page? Do you have an example I can look at?

  87. jsarber :

    Feb 2, 2008 6:44 pm

    I've left two comments now and both mysteriously disappeared. Go to jeremysarber.com/personal and click the "Current Chess Game" link at the top. You'll see what it does.

  88. John :

    Feb 2, 2008 9:36 pm

    Hi. Thanks for the plugin. I'm trying to display this Google Calendar
    http://www.google.com/calendar/embed?src=auburnbrewclub%40gmail.com&ctz=America/Chicago
    in this Wordpress page
    http://www.auburnbrewclub.org/calendar/

    It looks great so far, except the height. How can I change the height of the iframe?

  89. jsarber :

    Feb 4, 2008 1:02 am

    Hey again. It turns out that the page I was trying to present in the frame was causing the problem. I don't fully understand why but certain pages of GameKnot.com could not be displayed. It automatically redirected users from my page (with Pageview being used on it) to GameKnot. Thanks anyway.

  90. John :

    Feb 5, 2008 8:36 pm

    I figured it out. changed line 23 of pageview.css to 500px

  91. John :

    Feb 5, 2008 9:23 pm

    Well, it work great in IE, but in Firefox the iframe only shows up as a 3rd of the width as it does in IE.
    http://www.auburnbrewclub.org/calendar/

  92. Stefan :

    Mar 16, 2008 5:08 pm

    Nice, Works well for me. I modified it for my uses a bit.

  93. john :

    Apr 15, 2008 11:44 am

    This works great. However i'd like to keep the actual url to the page in the iframe hidden. If a user clicks on the title, the url is then displayed. Is their a way to keep that from being displayed?

  94. MightyA :

    Apr 17, 2008 7:18 pm

    Hi John,
    I am new to all of this and have been learning by trial and (mostly) error, so I would appreciate any help you can give me. I am using WordPress 2.5, the Autumn Concept 1.1 theme. I am trying to insert an Amazon.com astore into a webpage I have titled "Store" I have successfully downloaded your plug-in and activated it.
    In the HTML editor for this page, I've typed: what I believe your instructions said, and immediately followed it with the astore code, as follows:

    [pageview http://retireforlessincostarica.com/store/ "Retire for Less in Costa Rica" Store]

    However, when I publish and preview the page, all I see is a 404 Error. What am I doing wrong? Do I need to use the tags? Do I need to copy something from the pageview style sheet into my html editor?

    Thanks in advance,
    MightyA

  95. MightyA :

    Apr 17, 2008 7:20 pm

    This is weird...I actually cut and pasted the astore code following the above, and when I submitted it, the astore code disappeared...

  96. TJ Powell :

    May 6, 2008 8:08 pm

    This plugin works great! Thanks for the hard work on it!

  97. David :

    Jul 9, 2008 8:42 am

    In response to your comment 84, is there a way to set the height with inline code much like you can do with a tag?

  98. Soumyabg :

    Jul 11, 2008 3:12 am

    to change height or width you have to change the pageview.css file inside the plugin/pagview folder...

  99. Brant Peery :

    Jul 21, 2008 5:24 pm

    I have modified this a bit. I was unhappy with the way it handled the template file and how restrictive it was on the formatting. So I rewrote the replace routine in the class to find all key value pairs and pass them on to the template processing function. So now instead of being stuck with just url, description, and title you can use whatever you want (and as many as you want) Here is the change in usage.

    All parameters are optional. However it would be useful to have at least something that passes the url.
    [pageview parameter='value'...]

    To work with the existing template just pass these parameters
    ex.
    [pageview url='url' description='this is the description' title='this is the title']

    I like to throw on a style parameter so I can control the height of the iframe. That means that I must use that variable in the template file.

    <iframe src="" frameborder="0" style="" >Get a better browser!

    here is the change in the function in pageview.php

    function replace ($matches)
    {
    //Separate all the parameters
    preg_match_all("/\w*='[^']*'/", $matches[0],$allParameters);

    //split each parameter into a key=>value pair
    foreach ($allParameters[0] as $parameter) {
    $pair=split("='", $parameter); //do the split
    $pair[1] = trim($pair[1],"'"); //Trim off the trailing single quote

    //store the key value pair
    $pairs[$pair[0]] = $pair[1];
    }

    return $this->capture('pageview', $pairs);
    }

  100. Richard :

    Jul 23, 2008 9:24 am

    Thanks, this is exactly what i was looking for.

  101. author
    gavin :

    Sep 14, 2008 4:16 am

    Hi,
    Installed this plugin and have activated it - however I cannot get the webpage I want to display to show in the post. All that shows up is the code I typed in.

  102. John (author) :

    Sep 14, 2008 1:38 pm

    Check the code you typed - if it is showing up then either the plugin is not activated correctly, or you've mis-typed something.

  103. Putu :

    Oct 2, 2008 1:08 pm

    Hi, i already tray to use that but it doesn't work
    just show the [pageview url "some title" description]
    please help, at http://www.baliaround.com/?p=6

  104. John (author) :

    Oct 3, 2008 7:09 am

    Again, check the code you typed - if it is showing up then either the plugin is not activated correctly, or you've mis-typed something.

Pings & Trackbacks

efl.cc, my.donews.com, pruebas.flumo.com, rishel.org, sidekick.myblog.hk, sunccc.mireene.com, syed.theblognet.net, timesaver.in, uboat317.blog.cn.com, westblog.8866.org, 5mzen.com, bestfx.org, lzp729.cn, wordpressplugin.org, wp-plugins-db.org

Leave a comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008
Close
E-mail It