- Posts: 4
- Thank you received: 0
Adding new field (guestbook 2.0.2) and rss feed
9 years 6 months ago #13942
by Xianon
Adding new field (guestbook 2.0.2) and rss feed was created by Xianon
Hey!
I just thinking, how to add new field in guestbook 2.0.2? I know how that to do in old guestbook, but new guestbook is little bit different than older.
And my other question is: Is it possible make this guestbook script rss feed? That make many things easier if it possible. I'm little bit begginer with rss feed... so maybe this is stupid question.
Anyway i appreciate your answer.
Sincerely
- Xianon
I just thinking, how to add new field in guestbook 2.0.2? I know how that to do in old guestbook, but new guestbook is little bit different than older.
And my other question is: Is it possible make this guestbook script rss feed? That make many things easier if it possible. I'm little bit begginer with rss feed... so maybe this is stupid question.
Anyway i appreciate your answer.
Sincerely
- Xianon
Please Log in or Create an account to join the conversation.
9 years 6 months ago #13943
by Pete
DigiOz Webmaster
www.digioz.com
Replied by Pete on topic Adding new field (guestbook 2.0.2) and rss feed
Hi Xianon,
I will put together a short video on how to add a new guestbook field for the new guestbook version 2.0.2 soon and will share it here when it is done.
As for an RSS Feed, it is actually quite easy to do so. I will work on that and post a script here soon for that as well.
Thanks,
Pete
I will put together a short video on how to add a new guestbook field for the new guestbook version 2.0.2 soon and will share it here when it is done.
As for an RSS Feed, it is actually quite easy to do so. I will work on that and post a script here soon for that as well.
Thanks,
Pete
DigiOz Webmaster
www.digioz.com
The following user(s) said Thank You: Xianon
Please Log in or Create an account to join the conversation.
9 years 6 months ago - 9 years 6 months ago #13945
by Pete
DigiOz Webmaster
www.digioz.com
Replied by Pete on topic Adding new field (guestbook 2.0.2) and rss feed
Hi Xianon,
As promised, here is the new RSS Feed script for your guestbook, which will work with version 2.0.2, and will be included by default in the next version of the guestbook (2.0.3):
You can see it in action here, on our demo guestbook:
www.digioz.com/demo/php/guestbook/rss.php
And here is a screenshot of how it looks in IE:
I will work on the Video next for adding a new field to the guestbook.
Enjoy!
Pete
As promised, here is the new RSS Feed script for your guestbook, which will work with version 2.0.2, and will be included by default in the next version of the guestbook (2.0.3):
Code:
<?php
header("Content-Type: application/rss+xml; charset=UTF-8");
$rssfeed = '<?xml version="1.0" encoding="ISO-8859-1" ?>';
$rssfeed .= '<rss version="2.0">';
$rssfeed .= '<channel>';
$rssfeed .= '<title>DigiOz Guestbook</title>';
$rssfeed .= '<link>http://www.digioz.com</link>';
$rssfeed .= '<description>RSS Feed for DigiOz Guestbook</description>';
$rssfeed .= '<language>en-us</language>';
$rssfeed .= '<copyright>Copyright (C) 2015 DigiOz Multimedia, Inc</copyright>';
echo $rssfeed;
$rssfeed = '';
define('IN_GB', TRUE);
include("includes/gb.class.php");
include("includes/config.php");
$filename = "data/list.txt";
$handle = fopen($filename, "r");
if (filesize($filename) != 0)
{
$datain = fread($handle, filesize($filename));
fclose($handle);
$out = explode("<!-- E -->", $datain);
$outCount = count($out) - 1;
$j = $outCount-1;
for ($i=0; $i<=$outCount; $i++)
{
$lines[$j] = unserialize($out[$i]);
$j = $j - 1;
}
// Counting the total number of entries (lines) in the data text file --------
$result = count($lines);
$count = $result-1;
// Display guestbook entries --------------------------------------------------
for ($i=0; $i<$count; $i++)
{
$tmpMsg = $lines[$i]->gbMessage;
$tmpMsg = str_replace("<", "<", $tmpMsg);
$tmpMsg = str_replace(">", ">", $tmpMsg);
$tmpMsg = str_replace("\n", "<br />", $tmpMsg);
$tmpMsg = str_replace("\r", "<br />", $tmpMsg);
$rssfeed .= '<item>';
$rssfeed .= '<title>' . $lines[$i]->gbFrom . '</title>';
$rssfeed .= '<description>' . $tmpMsg . '</description>';
$rssfeed .= '<link>rss.php</link>';
$rssfeed .= '<pubDate>' . $lines[$i]->gbDate . '</pubDate>';
$rssfeed .= '</item>';
}
}
$rssfeed .= '</channel>';
$rssfeed .= '</rss>';
echo $rssfeed;
?>
You can see it in action here, on our demo guestbook:
www.digioz.com/demo/php/guestbook/rss.php
And here is a screenshot of how it looks in IE:
I will work on the Video next for adding a new field to the guestbook.
Enjoy!
Pete
DigiOz Webmaster
www.digioz.com
Last edit: 9 years 6 months ago by Pete.
The following user(s) said Thank You: Xianon
Please Log in or Create an account to join the conversation.
9 years 6 months ago - 9 years 6 months ago #13950
by Pete
DigiOz Webmaster
www.digioz.com
Replied by Pete on topic Adding new field (guestbook 2.0.2) and rss feed
Hi Xianon,
Here is a video that walks you through how to add a new Guestbook Custom Field to DigiOz Guestbook Version 2.0.2. I am also adding the modified version of the guestbook to this post for your reference.
Source: guestbook_2.0.2_country.zip
Changes: Click Here To View
Thanks,
Pete
Here is a video that walks you through how to add a new Guestbook Custom Field to DigiOz Guestbook Version 2.0.2. I am also adding the modified version of the guestbook to this post for your reference.
Source: guestbook_2.0.2_country.zip
Changes: Click Here To View
Thanks,
Pete
DigiOz Webmaster
www.digioz.com
Last edit: 9 years 6 months ago by Pete.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #13951
by Xianon
Replied by Xianon on topic Adding new field (guestbook 2.0.2) and rss feed
Thank you very much!
Please Log in or Create an account to join the conversation.
9 years 6 months ago - 9 years 6 months ago #13952
by Pete
DigiOz Webmaster
www.digioz.com
Replied by Pete on topic Adding new field (guestbook 2.0.2) and rss feed
You are very welcome.
DigiOz Webmaster
www.digioz.com
Last edit: 9 years 6 months ago by Pete.
Please Log in or Create an account to join the conversation.
Time to create page: 0.128 seconds