PDA

View Full Version : Newsfeed with Selector menu


Pages : [1] 2 3

tomshawk
10-27-2004, 02:11 AM
Hello,

This mod was talked about in this thread (http://www.vbadvanced.com/forum/showthread.php?t=1240)
I assume clord got busy, I created my own version of it, It looks alot like his, but, I dont know what he is using to pull feeds with. i.e. What Aggregator

Anyway, I used carp

Obviously, this is the one Prerequisite: but, if you have another aggregator you can modify this to use your own ;)

Carp
http://www.geckotribe.com/rss/carp/

you can download the free version here:
http://www.geckotribe.com/rss/carp/docs/download.php

Install Instructions:
http://www.geckotribe.com/rss/carp/docs/install.php

within the zip file is an instruction.txt file that should explain everything.

Demo:
http://www.tech-unity.com

Hope you like

tomshawk
10-28-2004, 08:19 PM
Updated the Instruction.txt file in the zip

There was something I forgot to mention about the carp path in the php file.

hope you all enjoy ;)

Our Sponsors
 

Sc0rpion
11-07-2004, 04:02 PM
Very nice indeed and easy to install. Installed and running great. Appreciate the work you put in.

Thankyou.


p.s Is there a way for it to display more than one feed per site. So say a site has 6 diffrent feeds, I only need to click on that sites feed link in the dropdown box and all 6 feeds will scroll one after another.

tomshawk
11-08-2004, 01:46 AM
Very nice indeed and easy to install. Installed and running great. Appreciate the work you put in.

Thankyou.


p.s Is there a way for it to display more than one feed per site. So say a site has 6 diffrent feeds, I only need to click on that sites feed link in the dropdown box and all 6 feeds will scroll one after another.

Yes, there is a way

open the php file for your feed that is in the feed folder you created and find the line that has the feed

example from my site:
CarpCacheShow('http://www.mcseworld.com/forums/external.php?forumids=120,177,212');

below it add
echo '<p>';
CarpCacheShow('http://www.mcseworld.com/forums/external.php');

replacing http://www.mcseworld.com/forums/external.php with the new feed from the same site

For a live example

Hit my site, and choose MCSEWorld from the list of feeds.
http://www.tech-unity.com

Glad you like ;)

Our Sponsors
 

Sc0rpion
11-11-2004, 01:12 PM
Thanks for pointing me in the right direction. :)

theMusicMan
12-11-2004, 12:05 PM
Hi tomshawk

Thanks for posting this.... however... I am stuck!!!!

What should happen when I select my newsfeed from the dropdown menu ...? Do I need to do anything else...?

Also, in the template file I see a reference to a file called mydomain/pages.php?getpage=RSS but I dont see that file anywhere in the Zip file or in the CARP installation files... what is this?

Sorry about being dull...:)

tomshawk
12-12-2004, 03:17 AM
Sorry theMusicMan

That reference is a link to a custom page I have set up on my site, where people can lists of feeds on my site and pull a paticular one if they want http://www.tech-unity.com/pages.php?getpage=RSS

You can change that link to something else, or get rid of it all together.

As for what it is supposed to do,
Once you click on something in the dropdown, the box itself should change to the feed which you selected and scroll up.

Check out my site, to see it in action. It will give you an idea as to what it should look like. I dont see it on your site, so I cant troubleshoot it, sorry!

Jester
12-17-2004, 08:49 AM
I'm sure I am doing something wrong but I can't figure out how to correct the following error message:

Warning: main(/home/strofan/carp/carp.php): failed to open stream: No such file or directory in /home/strofan/public_html/feed/feed1.php on line 7

Fatal error: main(): Failed opening required '/home/strofan/carp/carp.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/strofan/public_html/feed/feed1.php on line 7

The path is correct and the files are there, what could be causing the problem?

tomshawk
12-17-2004, 09:22 AM
From the errors, it looks like carp is not installed, or maybe it was installed to a different directory then what was in my example.

Could I get a link to your site? ;)

Jester
12-17-2004, 07:38 PM
Sure the link is: www.astrosfan.org

The module is currently setup so that the Admin is the only one who can view it.

tomshawk
12-18-2004, 01:19 AM
Sure the link is: www.astrosfan.org

The module is currently setup so that the Admin is the only one who can view it.

Because your module is only for admins, I cant really test.

Can you make a page for it, and just post the link here?

BTW, upload the file I attached into the root of your server and open it.

You should get something like this.

http://www.tech-unity.com/ssnews.php

This will tell you if Carp is installed correctly, because the errors I see above tell me it's not yet.

Jester
12-18-2004, 06:19 AM
Because your module is only for admins, I cant really test.

Can you make a page for it, and just post the link here?

BTW, upload the file I attached into the root of your server and open it.

You should get something like this.

http://www.tech-unity.com/ssnews.php

This will tell you if Carp is installed correctly, because the errors I see above tell me it's not yet.
Thank you for attaching that php utility. It appears that you are correct, as I am seeing the same error messages. So would it be in the Carp files or the vBulletin files that I need to check (to correct this problem)?

I've left the file in the root so that you could see what the error message is.

Jester
12-18-2004, 06:41 AM
I figured out what the problem was, I did not have /public_html/ as a part of the path. Now that it is working, it is having a problem with one of my other modules. On the right side I have a scores feed from CBSSportsline.com. When both the Newsfeed and the Scores are active, the Newsfeed is appearing where the Scores are and Scores are where the Newsfeed is. Crazy..

gothic1213
12-19-2004, 02:58 AM
Really like the work, thankyou very much for the hard work.
However, I keep getting the following error:

Fatal error: Call to undefined function: carpconf() in /home/lcsystem/public_html/feed/feed1.php on line 10

The carp installation is as yours, so paths are all correct.
Many thanks in anticipation.

tomshawk
12-19-2004, 03:38 AM
Really like the work, thankyou very much for the hard work.
However, I keep getting the following error:

Fatal error: Call to undefined function: carpconf() in /home/lcsystem/public_html/feed/feed1.php on line 10

The carp installation is as yours, so paths are all correct.
Many thanks in anticipation.

If you did not modify the feed1.php line 10 should say

CarpConf('maxitems',10);

All this line does is tell carp how many posts to pull from the site you set.

I'm assuming the directory where you installed carp is /home/lcsystem/carp/
If it is a different directory, modify line 12 to your represent your carp.php file.

Copy the attached file to the root of your server and load it into your Web Browser

You should get the feed from my site.

If you get the same error, check your carp installation, if this file works. Post the contents of line 10 of your feed1.php file

gothic1213
12-19-2004, 04:43 AM
Many thanks for the really prompt reply.
I ended up having to use:
require_once "./carp/carp.php";
for line 12 in the end, no idea why! When using the original line it kept saying carp was not installed. Still, works fine now and again, many thanks.

tomshawk
12-19-2004, 10:26 AM
Interesting

None-the-less I'm glad it works ;)

ptmuldoon
02-19-2005, 11:53 AM
I've got this setup and working nicely. But can someone possibly tell where to find the code to change font and font size? I'm looking in the feeds and in the carp files and can't seem to find any reference to it. It must be there, but I'm missing it.

ptmuldoon
02-21-2005, 02:45 PM
anyone?

Alderwazeh
02-25-2005, 12:19 PM
Thanks a lot Tomshawk...
Indeed great work ... I will install it soon ...I enjoed your site installtion for this feed and I will do the same ... I appricaite it ..
This site gives free RSS News feeds I would say .. I picked the bbc news from there
http://www.freshcontent.net/

tomshawk
02-26-2005, 04:50 AM
I've got this setup and working nicely. But can someone possibly tell where to find the code to change font and font size? I'm looking in the feeds and in the carp files and can't seem to find any reference to it. It must be there, but I'm missing it.

WOW, I'm sorry, I totally missed this

There is not alot that can be done, but..

From this page
http://www.geckotribe.com/rss/carp/

There is a link to examples
http://www.geckotribe.com/rss/carp/docs/examples/

I'm sure looking at the examples you can gt some ideas on changing fonts and sizes.

HTH

tomshawk
02-26-2005, 04:52 AM
Thanks for the link Alderwazeh, It's always kewl to have extra resources ;)

Jeffreh
03-02-2005, 05:54 PM
Thanks a lot for the script, its very helpful, but I'm having a bit of trouble. I have the correct paths set in the feed files, but I get the same error as Jester did. I don't know how I messed up the carp install, but that file you attached also caused an error. (http://www.xnet-nine.com/condemnedlegion/astrofan.php)

There is another problem that I can't figure out either... http://www.xnet-nine.com/condemnedlegion/index.php?page=videos there you can look at a test page i created, (so that the members won't see the problems im having ;)) and you may notice that the module is way above everything else, and not in the center column like it's supposed to be. :P

Sorry this is my first module addition, and I'm struggling. Any help would be greatly appriciated!

email = Jeff@arnoldesign.com

tomshawk
03-02-2005, 09:48 PM
Thanks a lot for the script, its very helpful, but I'm having a bit of trouble. I have the correct paths set in the feed files, but I get the same error as Jester did. I don't know how I messed up the carp install, but that file you attached also caused an error. (http://www.xnet-nine.com/condemnedlegion/astrofan.php)

There is another problem that I can't figure out either... http://www.xnet-nine.com/condemnedlegion/index.php?page=videos there you can look at a test page i created, (so that the members won't see the problems im having ;)) and you may notice that the module is way above everything else, and not in the center column like it's supposed to be. :P

Sorry this is my first module addition, and I'm struggling. Any help would be greatly appriciated!

email = Jeff@arnoldesign.com

Hello Jeff

that file "astrofan.php" was setup for Jester and is trying to pull data from his carp install which he may not have anymore, dunno

Try the one I have attached for you which should be pointed to your carp install.

If it does not work, change line 12 from

require_once
"/home/tbp/domains/xnet-nine.com/public_html/condemnedlegion/carp/carp.php";

to require_once "/home/tbp/domains/xnet-nine.com/public_html/carp/carp.php";

It just depends on where your carp install is.

If you want to give me a PM with an account that has admin access, I can take a look at the module and see if I can fix it, if you like.

;)

Jeffreh
03-03-2005, 05:07 PM
http://www.xnet-nine.com/condemnedlegion/Jeffreh.php I uploaded the file, and it fed just fine. I checked my site again, and it was feeding just fine! :eek: I didn't change anything, and it just suddenly miraculously began to work. I guess I did it right the first time? Well there is still one problem. http://www.xnet-nine.com/condemnedlegion/index.php?page=videos you'll notice that the feeder is on the very top of the page, stretched, above the banner. It belongs below in the center column... How would I go correcting this error?

(And thanks a lot for your help so far, I'm glad your here. :D)



EDIT : I pm'd you with account access, so you can check the module. I may have done something wrong.

tomshawk
03-03-2005, 08:13 PM
Jeff,

One word for ya, "Template" ;)

Check out the instructions again ;)

I fixed it for ya, so no worries ;)

Now, for security reasons, you may want to change your password, k? ;)

Take care

Jeffreh
03-03-2005, 10:42 PM
Oh man, Thank you so much. *slaps forhead* Sometimes I scare myself. haha thanks again for your help.

Alderwazeh
03-04-2005, 02:26 PM
Hi Tome and thanks again for the module...
Now I have for you this feed directory...
http://www.feed-directory.com/ >>its updating monthly I would guess..

Now I want your advice in the following tasks I done concerning your instructions and Carp installation instructions >>please comment

1. I upload carp files to a Home directory above th public-html directory and installed it and it told me that my installation is ok
2.I create another dirctory besides carp dirctory and i called it feed where i put feed1...feed 10 ... also this directory above public_html

3.Now I should take the feed files from xml or from rss ?...from the dirctory on the above url what should I put ...can you give example ... for example I want to put the BBC Mobiles News....because I put already files from the browser url
title for the xml file ...please clerify this point because I am confused from rss file extension and xml .. Thanks again Tome

Alderwazeh
03-04-2005, 02:59 PM
Thanks Tome for your response in the last part concerning rss ..vrsus ..xml ..I understand from your response in "problem snd Troubleshoting" tha carp should read both rss and xml ... I undersatand ..thanks again for the tutorial page in RSS..

Just want you to comment on the first part regarding creating and placing Carp and feed directory ....TX

tomshawk
03-05-2005, 12:36 AM
alderwazeh, I'm glad the description helped ;)

First off, the carp is installed in the right place, good job ;)

Second, the feed directory is in the wrong place, it should not be above the public_html directory, it should be directly below it ;)

Third, on or around line 26 of feed1.php you'll find this line
CarpCacheShow('http://www.linuxjournal.com/news.rss'); or something like it.

Change it to the link of the feed you want.

On that link you pointed to, I dont see a BBC Mobile News, but lets use the "BBC News | Europe | World Edition" as an example
To the right on that is a column thats says Feed Link, right click that XML image and get the link properties Copy the link and replace the link in that line above, "Line 26"

That will get feed working

Let me know if you need anymore help ;)

Alderwazeh
03-05-2005, 04:44 AM
Every thing is fine Tome I installed the module its great ... one of the things that carp gives after confirming the complete installation is a script recommended to put in our site .. and the most important bet in that script the the correct url path for my site so I just copied it and past it in feed 1 php file and the BBC I tooked it as a file with xml extension ..it works fine so carp reads xml in my case and rss in your case..
I am really gratiful for you Tome ..nice and very useful modul indeed.

dmistry
03-05-2005, 11:34 AM
Can someone tell me what directory the adv_portal_newsfeed goes in I have created the module but it is not showing up on my page. If i hit the feeds1.php directly i get the feeds so I guess the carp part is working

http://www.orangecountyi.com/feed/feed1.php

The only thing I can think is wrong is that I have the adv_portal_newsfeed in the wrong place I currently have it in forums/includes/adv_portal_newsfeed

Thank You

tomshawk
03-05-2005, 11:44 AM
adv_portal_newsfeed is a template, not a file

Create a new template called adv_portal_newsfeed and paste the code into it

Then in the module call the template "newsfeed", not a file.

HTH

protoss
03-05-2005, 03:54 PM
Nice one tomshawk. :cool:

Someone asked about changing text format

You can do this by using combination of tags and <div></div>

Example Feed attached

HTH

protoss
03-05-2005, 04:10 PM
:eek: Forgot to attach an image

The above file will produce this. I'm sure you can figure out where to edit the backgrounds etc.

Just comment out // anything you do not want to use.

HTH

tomshawk
03-05-2005, 04:15 PM
Nice one protoss,

Well done ;)

Alderwazeh
03-05-2005, 05:25 PM
very nice protoss...I used frontpage to play with template font and background

d4j1nx
03-09-2005, 07:58 AM
tom, can I ask where you for the feed for the symanetic antivirus on your site?

Thanks!

tomshawk
03-09-2005, 10:35 AM
d4j1nx, I released it here and at vbulletin.org, Here is the link to the one here.

http://www.vbadvanced.com/forum/showthread.php?t=2610

Most of the work to integrate it into vBadvanced was done by KW802

I'm glad you like ;)

recurry
03-15-2005, 12:37 AM
Perhaps I'm spacing it but I can find no text file in the zip with instructions on how to create this module. Can someone help?

Thanks,
recurry

tomshawk
03-15-2005, 12:51 AM
Perhaps I'm spacing it but I can find no text file in the zip with instructions on how to create this module. Can someone help?

Thanks,
recurry

I'm not sure what the problem may be.

I just downloaded it to verify.

the file is called instructions.txt, but here you go

recurry
03-16-2005, 01:30 AM
I'm not sure what the problem may be.

I just downloaded it to verify.

the file is called instructions.txt, but here you go

I found it. Sorry for the fire drill...

Thanks,
recurry

Caveman2k2
03-27-2005, 02:50 AM
Hi guys,
having some problems getting this to work properly. I installed and modified everything according to instructions, however, I get an error in the status bar on IE6 saying "Unterminated string constant" and I just get a module box that has the "select a feed" dropdown list. If I try http://mydomain.com/feed/feed(x).php I can see the feed, so atleast carp is working. Also, my forums are set up on a sub domain and not in a sub folder. Not sure if this has any impact or not, but figured I'd mention it. Any help with this??

camoman
03-27-2005, 10:51 AM
Can you pull news feeds from any site?? I am new to this whole news feed thing so pleaes bare with me..
I run an ATV/snowmobile site and would liek to pull articles from various atv and snowmobile magazine sites.. is this possible??

tomshawk
03-27-2005, 12:08 PM
Caveman, can you provide a link to your site so we can take a look ;) I think your subdomain point is exactely why, but... Lets verify ;)

Camoman,

Thise script will work with RSS, RSS2 JS, XML, and RDF newsfeeds so it should work with no problems.

If you can post the links to these sites, I'm sure we can find the rss feeds links ;)

Caveman2k2
03-27-2005, 12:38 PM
Sure, the main cmps is at http://www.nfltalk.com and the forum is located at http://forum.nfltalk.com.

Thanks for any help Tomshawk

camoman
03-28-2005, 08:55 AM
Camoman,

Thise script will work with RSS, RSS2 JS, XML, and RDF newsfeeds so it should work with no problems.

If you can post the links to these sites, I'm sure we can find the rss feeds links ;)

These would be some of the sites I would like to pull articles from..

http://www.atvnews.com/
http://www.atving.com/
http://www.dirtwheelsmag.com/ME2/Default.asp
Do you think it's possible?

tomshawk
03-28-2005, 09:37 AM
Sure, the main cmps is at http://www.nfltalk.com and the forum is located at http://forum.nfltalk.com.

Thanks for any help Tomshawk

Caveman2k2

In the template, try changing the the lines of the feeds from this

thetext[1]="<iframe width=100% height=200 frameborder=0 scrolling=no src=feed/feed1.php></iframe>";

to this

thetext[1]="<iframe width=100% height=200 frameborder=0 scrolling=no src=http://www.nfltalk.com/feed/feed1.php></iframe>";

and see what happens

It looks like your template is trying to pull it from the forums/feed/ directory, so we want to make it a full static path.

HTH

tomshawk
03-28-2005, 09:43 AM
These would be some of the sites I would like to pull articles from..

http://www.atvnews.com/
http://www.atving.com/
http://www.dirtwheelsmag.com/ME2/Default.asp
Do you think it's possible?

I will keep looking on these sites for a while but it appears none of these sites support RSS feeds. You may want to try to contact support for these sites as well and just ask them for a link to their RSS feeds if they have one.

Caveman2k2
03-28-2005, 12:52 PM
Changes made, but it still didn't fix it. I'm still getting the following 2 errors:
Line: 760
Char: 134
Error: Unterminated String Constant
Code: 0
URL: http://www.nfltalk.com/


Line: 741
Char: 1
Error: 'thetext' is undefined
Code: 0
URL: http://www.nfltalk.com/
Here are the lines of code from 741 to 760 when opened in UltraEdit: <select name="select" onChange="displaydesc(document.form.select, thetext, 'textcontainer')">
<option selected>Select A Feed</option>
<option>ESPN</option>
<option>CBS Sportsline</option>
<option>Fox News Sports</option>
<option>Yahoo Sports</option>
<option>Sports Illustrated</option>
<option>My Sportsbook</option>
<option>NFL Blog</option>
<option>NFL Players</option>
<option>Safe Picks</option>
</select>
</form>
</span></td>
</tr>
<tr>
<td class="alt1" align="left"> <span id="textcontainer"></span>
<script type="text/javascript">
var thetext=new Array()