vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Latest Blog Feed in Postbit using Carp RSS (https://vborg.vbsupport.ru/showthread.php?t=91781)

djbaxter 05-13-2007 03:03 PM

After upgrading to 3.66, my previous blog add-on needed to be redone. I decided to try this one instead, since frankly the previous one was a royal pain.

Works like a charm in 3.66 and seems to get Blogger feeds as well as other normal RSS feeds. Just set up the blogger feed URL as follows:

Code:

http://{blogname}.blogspot.com/feeds/posts/default?alt=rss
Of course, if your members encounter any difficulty getting their feeds to show up, you can always tell them to process it through Feedburner and use that URL.

I also couldn't get it to work with custom field paths but it's fine if you just delete those lines.

Thanks, nevetS! :)

djbaxter 05-21-2007 06:50 PM

Question:

Anyone know what I have to do to correct a blog title like the following:

Quote:

The sad state of Canada?s health care system
i.e., what do I have to do to get it to correctly parse or display "Canada's" instead of "Canada?s"?

wtricks 05-24-2007 03:18 PM

Quote:

You did not enter the correct format for the My latest blog entry field. Please read the field description for the expected format.
What's the format it expects? I tried my link from feedburner, the link of the rss feed as it appears in the footer of my wordpress blog .. nothing. Thank you in advance ;)

djbaxter 05-24-2007 03:50 PM

I don't use Feedburner but for WordPress it should look like http://www.somenlog.com/feed/

wtricks 06-07-2007 03:34 PM

I used this and 3 other possible links with no use. Here is the code as I have put it in the plugin section. I might have not set the path correctly I assume.

Code:

require_once 'carp/carp.php';
CarpConf('cacheinterval',120);
/** You may want to set a cachepath specifically for your forum **/
CarpConf('cachepath','carp/');
CarpConf('cacherelative',0);
/** You can omit the above two lines without a problem **/
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',1);
CarpConf('iorder','link');

I have the carp folder in : wtricks.com/forums/carp and the cache folder is in wtricks.com/forums/carp/cache ...

Thank you again for any possible tips as how to solve this :)

Retal 06-20-2007 10:05 AM

I will pay 15 bucks via PayPal to the person who will make an installable and working product for vB 3.6.x from this one. If someone is interested, please PM me

Snider 06-28-2007 01:16 PM

I don't even get an error - it just shows the Blog: and no link or text at all.

Any ideas ?


http://www.widewebtalk.com/showthrea...=1861#post1861

djbaxter 06-28-2007 01:24 PM

Quote:

Originally Posted by Snider (Post 1278417)
I don't even get an error - it just shows the Blog: and no link or text at all.

Any ideas ?

http://www.widewebtalk.com/showthrea...=1861#post1861

Did you create and run the cron job ("scheduled task") to update the feeds?

Snider 06-28-2007 01:28 PM

No I have not as that is not in the instructions to do that I can find.

djbaxter 06-28-2007 01:41 PM

My aplologies - you're correct. That was for another add-on I tried that didn't work properly for me.

If I recall correctly, I had to fiddle with this a bit to get it to work.

Make sure that your Carp Configuration plugin looks like this:

Code:

require_once '/full/server/path/to/forum/carp/carp.php';
CarpConf('cacheinterval',120);
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',1);
CarpConf('iorder','link');
CarpConf('linktarget',1);

And that your Get Users Blog Entry plugin looks like this:

Code:

ob_start();
CarpCacheShow($post[field6]);
$blogentry = ob_get_contents();
ob_end_clean();

Then double check that the correct field is identified in the edits to your postbit:

Code:

<if condition="$post['field6']">
<div class="smallfont">Recent Blog: $blogentry</div>
</if>

In the supplied example, it is field5. For my forum it was field6. It may be different for you forum.

Snider 06-28-2007 01:45 PM

Got it - the second plugin had the wrong filed in it !!!

Thanks

wtricks 07-22-2007 02:07 PM

Yet another hack that doesn't work and no one would know why. I would like to get some thorough installation guide (with all the steps DETAILED, such as creating that profile field for example) and other issues.

It's been weeks since I posted for support and still NO ANSWER.

That kinda does it. Will have to look for something else :(

irishblacknight 07-22-2007 02:39 PM

Quote:

Originally Posted by wtricks (Post 1298249)
Yet another hack that doesn't work and no one would know why. I would like to get some thorough installation guide (with all the steps DETAILED, such as creating that profile field for example) and other issues.

It's been weeks since I posted for support and still NO ANSWER.

That kinda does it. Will have to look for something else :(

People post hacks in their spare time.

If you can't get the hack to work that's not their fault.

If you were paying for the hack it would be a different matter, but I honestly don't see how you have any right to complain when something given for free does not work for you.

Snider 07-22-2007 03:05 PM

Works fine for me

wtricks 07-22-2007 03:41 PM

Can you please tell me what changes you made with it so that it works?

I am indeed frustrated since I have tried ALL possible changes people posted in here and it won't work. I am a skin designer for forums and have installed hundreds of hacks that worked. And it's frustrating for me to not be able to install something because of lack of correct code and installation guide. A real installation guide with all steps.

Sorry if I offend, but I paid 160 USD for a script and 20% of the hacks I installed won't work, I won't get support from the developers, who still want to have the hacks nominated, but won't even write a readme file that would take you through all the steps :)

There is surely something people did to make this work, it would be nice if the people with experience in this would tell us, the ones who fail to understand, what to do. That's what I do in my communities and it would be beneficial for this one too.

BigJimTheLug 07-28-2007 10:11 PM

*Nice work, I'll try this. I have the most recent blog entry listed as well, but only using a user's website or blog link.

vegabond 07-30-2007 06:32 PM

Quote:

Originally Posted by djbaxter (Post 1278420)
Did you create and run the cron job ("scheduled task") to update the feeds?

Could you please tell me how can i set a Cron job for blog entry hack?

No err, just showing:

Recent Blog:

:(

pmkb 07-31-2007 01:51 PM

No chron job is required. It's working fine with 3.6.8.

Make sure you have Carp installed and working correctly before blaming this hack.

vegabond 07-31-2007 08:53 PM

Quote:

Originally Posted by pmkb (Post 1306199)
No chron job is required. It's working fine with 3.6.8.

Make sure you have Carp installed and working correctly before blaming this hack.

Carp is installed. And I did not blame this hack :)

What can be the fault? Can u guess?

Thanks

pmkb 08-01-2007 12:19 PM

Not without seeing your site's ACP. I'd suggest double checking the instructions above and make sure that you modified the paths, profile field number, etc. to fit your set up.

jerrygad 08-02-2007 05:55 AM

Sorry for dugging this old topic, but just want to let you all know that this hack working correctly even with 3.6.8.

gotlinks 11-19-2007 05:37 PM

I keep getting this error?

[CaRP] Can't open cache file.

[CaRP] Failed to open file: /home/thrdgami/public_html/bzimage/rss/carp/autocache/58fae8eb72e8579438002f3ea9fd5c09

[CaRP] Can't open remote newsfeed.

gotlinks 11-27-2007 12:14 PM

Here is how to fix this mod! And it works perfect on my forum at www.bzimage.org


Quote:


First of all download carp from here: http://www.geckotribe.com/rss/carp/

I am using the free version and it works perfectly.

Unzip the carp archive (zip) and upload the carp folder to your forums home directory.

Upload the carpsetup.php to the same directory as of your showthread.php (forums home) folder.

Run the setup file, it will give you two choices..

1) directory cache and the other.. mysql cache. I am using directory cache and I recommend you to try this one.

When you hit next, carp will install cache folders to your carp/ directory. If you don't see any errors here then the setup is complete, you should now delete the carpsetup.php from the forum home directory and carpsetupinc.php from your forums/carp/ directory. If you encountered any errors here then it's highly likely that you need to change the directory permissions for you /carp folder in order allow the script to create cache directories.

Now the rest of the process is fairly simple.

Open your admincp (vb) and create a custom profile field. It should be Single-Line text box. Click next and fill the fields. Give it an appropriate title/description, i.e:

For title: Blog Feed
For description: Enter your Blog's RSS feed URL here i.e. http://myblog.com/rss.xml

Leave the default value field empty. Change max length allowed for user input to 200. Field should be editable by user, not a private field, not searchable on member list and do not show on member list. Leave the regular expressions field blank. In the Display page option below, set it to Edit profile and click save.

Now add two plugins in your admincp's Plugins and Products >> Add new plugin. For the first plugin: Selected "global_start" as your hook location, give it an appropriate title (can be anything) and paste the following php code in the plugin php code area:


PHP Code:

require_once 'carp/carp.php';
CarpConf('cacheinterval',120);
/** You may want to set a cachepath specifically for your forum **/
CarpConf('cachepath','carp/');
CarpConf('cacherelative',0);
/** You can omit the above two lines without a problem **/
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',1);
CarpConf('iorder','link'); 

Set the plugin to active and click save. Now it's time to add the second plugin:

Attach it to postbit_display_start as the hook location, give it a title & paste the following code in the plugin php code area:


PHP Code:

ob_start();
CarpCacheShow($post[field5]);
$blogentry ob_get_contents();
ob_end_clean(); 

Set the plugin to active and click save.

Now open your postbit template:

FIND

PHP Code:

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if> 

ABOVE ADD

PHP Code:

<if condition="$post['field5']">
<
div class="smallfont">Recent Blog$blogentry</div>
</if> 

Save your template. Now to test it, go to your usercp> edit profile and scroll down, you will see the Blog Feed option there, add your blog's rss feed and hit save changes. Now go to your forums and look for any of your post.. you will see the latest blog link below your username.

If you encounter any problems then post a message here and I will try to fix it accordingly.

jamestl2 01-23-2008 04:29 AM

OK,
I downloaded this and everything is working great. The only issue I seem to be having with it is the fact that all the blog post titles have all the quote and apostrophe marks replaced with question marks, anyone know why?

nevetS 01-23-2008 01:14 PM

This most likely has to do with the fact that the rss feeds are unicode. Do you have an rss feed exhibiting the problem that I can point to?

I would think that if your forum is displaying unicode and the rss feed is unicode it wouldn't be a problem, but if you have a doctype specifying western characters it will show the western character version - which is usually a question mark, but it depends on the font.

It could be a problem with carp, though.

I may be able to insert a regex to replace the characters appropriately.

jamestl2 01-23-2008 02:51 PM

Well,
my forum I'm using is:
http://www.conspiracy-forums.com/

and the feed for my blog in my postbit is:
http://www.lightningshock.com/feed/

So I'm not exactly sure where the error is turning up.

nevetS 01-24-2008 10:25 AM

I'm just barely starting to look into this - busy work day. I'll get back to you shortly.

nevetS 01-24-2008 10:38 AM

There's definiitely a combination of unicode (UTF-8) (rss feed) and western character sets (ISO-8859-1) (forum page) going on - although I'm actually unsure of a fix at the moment. Looking at the output, there isn't a difference between single and double quotes.

I'll spend some more time this morning checking it out.

nevetS 01-24-2008 01:52 PM

OK - interesting, but not a solution yet -
If you add the following to your carp configuration, it will output the quotes properly -
Code:

CarpConf('encodingout','UTF-8');
But - it will only work if the document type is UTF-8, otherwise you get garbled characters.

This is typically done by having a meta tag in the header as follows:
Code:

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
but that isn't working on my forum. Firefox is still showing the page as ISO-8859-1.

I am a bit concerned that fixing this problem might just break some other things.

There is another option in CarpConf
Code:

CarpConf('fixentities',1);
but that only seems to fix your opening quote, not your closing quote or the single quote.

nevetS 01-24-2008 02:18 PM

OK... so here we go. Beware that this may potentially cause some problems because we're changing character encoding. I don't know what kind of problems it might cause but there seems to be a lot of discussion about UTF-8 and I personally don't know a heck of a lot about it.

My mindset is to give it a shot, and be prepared to roll back these changes if they affect anything else.

In your carp configuration plugin - the one that has a hook on global_start
add:
Code:

CarpConf('encodingout','UTF-8');
Then go into your admincp and go to languages.

select language manager, then edit the US English settings. Change the character set from ISO-8859-1 to UTF-8 and then it should work.

The things I would be concerned about testing right off the bat would be any add-ons you have that involve javascript. I don't think this change updates the database at all, so the underlying database tables probably still have a character set of ISO-8859-1. Try posting and searching text that includes unicode characters - maybe copy/paste from http://www.revfad.com/flip.html

jamestl2 01-25-2008 07:30 PM

Thanks nevetS,

The characters look correct now, I suppose I'll repost here if I notice any other output changes it may have had.

romanticyao 03-18-2008 05:30 PM

this is very useful

auctionguy 05-12-2008 05:24 AM

Anyone tried this with 3.7 Gold yet?

Looks like an awesome hack!

nevetS 05-12-2008 05:33 AM

I use it with 3.7 gold myself. I keep meaning to put out a cleaner update, but it works for me right now so other things keep taking priority.

(cleaner meaning easier install, inherent support for UTF-8 feeds, and atom support)

pmkb 05-12-2008 11:41 AM

Quote:

Originally Posted by nevetS (Post 1516832)
... and atom support...

Can this be done with the free version of CaRP? I tried to build a solution using MagPie precisely because this solution can't handle atom feeds. Unfortunately, there appears to be some conflict with MagPie and vB's AJAX code.

nevetS 05-12-2008 04:06 PM

Actually dual magpie/carp support is on my todo list. I know with the paid version of carp (which I have), there's now atom support. I paid for it ages ago and they keep sending me updates.

As far as the MagPie conflict goes - I haven't experienced it myself just yet, but I'll see what happens when I get into it. I'm sure there's something out there that will support atom.

I'll get going on this this week. I'm kind of stumped on my other project right now :), so this might provide enough of a break to get my brain working properly again.

pmkb 05-13-2008 12:30 PM

In that case, you might want to take a look here (around post #21):

https://vborg.vbsupport.ru/showthread.php?t=156372

masterweb 08-09-2008 09:34 PM

Just a stupid question: it works with Vbulletin 3.7.2?, if yes must i follow the same instructions on the first main post or there is any update about installing it?...Thanks a lot.

djbaxter 08-09-2008 10:52 PM

Yes. It works with 3.72.

Piccante 08-11-2008 08:50 AM

Can't get this working in 3.7.2 (I previously had it working in 3.5).

Getting errors about a call to undefined function for CarpCacheShow, even though it is defined afaics.


All times are GMT. The time now is 04:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01367 seconds
  • Memory Usage 1,850KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (4)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete