dcteam 06-08-2005, 01:02 PM A while ago (okay a long long time ago) I said I was going to do a hack to display the last blog entry like Shawn has done at DP. Well I finally got round to it, an example can be found here (http://forums.hostmatrix.org/showthread.php?t=5060). I've not written it up in an easy to follow manner as yet but if anybody would like to implement (and hopefully motivate me into writing the instructions) please ask away, all I'll ask for is a nice link back in return :) .
noppid 06-08-2005, 02:04 PM I think you may need to prove your code before you ask for a link.
I mean I guess one could take the link down, but most won't put up a link to you to try your code.
I'm sure what your said came out wrong or sounded wrong, so bring on the code! :D
dcteam 06-08-2005, 02:18 PM Howdy noppid, I probably worded it a bit wrong. I ain't asking for a link up front just once it's working (and even then I'm only asking). I don't want to publish the code to the world just yet, as it will likely need a few wrinkles ironing out.
I'll happily help somebody set it up on their forum. Basically if anybody is willing to give it a try I'll provide the files and instructions, via IM, PM or whatever.
noppid 06-08-2005, 03:06 PM Howdy noppid, I probably worded it a bit wrong. I ain't asking for a link up front just once it's working (and even then I'm only asking). I don't want to publish the code to the world just yet, as it will likely need a few wrinkles ironing out.
I'll happily help somebody set it up on their forum. Basically if anybody is willing to give it a try I'll provide the files and instructions, via IM, PM or whatever.
Links are no big deal, we can always find a place for um.
I want to see the raw code so I can copy it, er check it out. :D
minstrel 06-08-2005, 10:02 PM I'd also be interested in seeing the code to see how difficult it would be to adapt it to phpBB.
noppid 06-09-2005, 12:44 AM I'd also be interested in seeing the code to see how difficult it would be to adapt it to phpBB.
I can do it on vB in 25 lines of code, no additional queries, plus the RSS reader install. :)
Joeychgo 06-09-2005, 12:58 AM :D Sweet
dcteam 06-09-2005, 01:07 AM It's not a difficult thing to do, it will take me longer to write up the instructions than it did to do the mod (I hate writing instructions). As noppid can do it so easily I feel like I'm wasting my time even starting this thread.
noppid 06-09-2005, 01:08 AM :D Sweet
I wouldn't rejoice yet. I'll think about this more while I sleep.
noppid 06-09-2005, 01:09 AM It's not a difficult thing to do, it will take me longer to write up the instructions than it did to do the mod (I hate writing instructions). As noppid can do it so easily I feel like I'm wasting my time even starting this thread.
Don't feel that way. We didn't do this to beat you out or compete. We had it on the back burner.
We have no intention of releasing it. You run with yours. In fact, once I see it, I'll be glad to make suggestions.
Joeychgo 06-09-2005, 01:12 AM It's not a difficult thing to do, it will take me longer to write up the instructions than it did to do the mod (I hate writing instructions). As noppid can do it so easily I feel like I'm wasting my time even starting this thread.
I hope your not upset - As noppid said, we've been planning this hack for some time. It isnt going anywhere, and im sure noppid will give you any advice you might want.
dcteam 06-09-2005, 01:18 AM The hack is done and working, just need to write the instructions so that I can share it with others. Must admit I did feel a bit put out by the reactions this thread got, my only intention was to share a hack I've already got working and if I get a link back in return all the better.
Considering this is a simple hack that is being given away I don't see it as a competition, like I said I was just trying to share. When I've written the instructions up I'll post a link.
noppid 06-09-2005, 01:22 AM The hack is done and working, just need to write the instructions so that I can share it with others. Must admit I did feel a bit put out by the reactions this thread got, my only intention was to share a hack I've already got working and if I get a link back in return all the better.
Considering this is a simple hack that is being given away I don't see it as a competition, like I said I was just trying to share. When I've written the instructions up I'll post a link.
Please do. When I read Minstrel's post, I really forgot this was your thread, forgive me. That was no intention in slighting you. It's after 4 am, 4 beers and a bunch of code. The bragging came out too easy.
Like I said, this won't be seeing daylight and if we can help you, the community is the winner. We appreciate you posting with us. :)
minstrel 06-09-2005, 08:40 AM Damned impertinent vBulletiners... what about us damned impertinent phpBBers? Huh?
:mad: :o :o :o
Joeychgo 06-09-2005, 01:05 PM Damned impertinent vBulletiners... what about us damned impertinent phpBBers? Huh?
:mad: :o :o :o
We'll convert you yet :D
noppid 06-09-2005, 01:28 PM Damned impertinent vBulletiners... what about us damned impertinent phpBBers? Huh?
:mad: :o :o :o
Who gave you the secret password anyway? :D
ResaleBroker 06-09-2005, 03:56 PM I'll happily help somebody set it up on their forum. Basically if anybody is willing to give it a try I'll provide the files and instructions, via IM, PM or whatever.I'd be more than happy to give it a spin. Once I see what it takes maybe I can help you out with the instructions.
dcteam 06-09-2005, 04:13 PM Hi RB, I'd be pleased to help. About to crash now but I'll be happy to try tomorrow. It's just a case of adding a few new profile fields, a PHP script and a Cron job, you can either wait for my crappily written instuctions or PM me an IM mechanism and I'll help you the write the instructions :).
ResaleBroker 06-09-2005, 04:28 PM PM me an IM mechanism and I'll help you the write the instructions.I sent a PM with my ICQ number. Thanks! :)
dcteam 06-11-2005, 08:26 AM I've written up a tutorial on how to display member blog entries on a forum (http://forums.hostmatrix.org/showthread.php?p=39275). It took me 10 times longer writing the tutorial than it did doing the hack, any questions, comments or (ideally constructive) critisms please feel free.
Edit: it's got nothing to do with how the rss feed is diaplsyed here, but did have the same private "its working for me" bug at one point :D
ResaleBroker 06-25-2005, 07:42 AM I've written up a tutorial on how to display member blog entries on a forum (http://forums.hostmatrix.org/showthread.php?p=39275). It took me 10 times longer writing the tutorial than it did doing the hack, any questions, comments or (ideally constructive) critisms please feel free.I only made it step two (2) in your tutorial: Writing a PHP script to populate fields
The CafeRSS download seems to be corrupt. I do have Carp installed but I don't know how to write a script similar to yours.
Has anyone written a script for this using Carp?
dcteam 06-25-2005, 07:58 AM What error message do you get whrn you run the script?
I've not used CARP but all it needs to do is populate a few fields from the contents of an XML file so it shouldn't be difficult to do.
ResaleBroker 06-25-2005, 08:50 AM What error message do you get whrn you run the script?
Startselect userid, field7 from userfield where field7 <> '' and field7 is not NULL
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/sales/public_html/latestblog.php on line 43
noppid 06-25-2005, 09:05 AM I just took a look at your class, why do you keep reinstanciating that class in the loop? Wouldn't one instance before the loop do the job of making the funtions available? That is popping of a new instance of two classes for each loop. Your class and the cafe class. That seems redundant overhead. Was there a reason for that? Couldn't you code your class so that it's reusable maybe only re-initializing the cafe class then instead of a new instance?
ResaleBroker 06-25-2005, 08:56 PM Noppid, you wouldn't happen to have a script for something like this just laying around would you? :rolleyes:
noppid 06-25-2005, 09:18 PM Noppid, you wouldn't happen to have a script for something like this just laying around would you? :rolleyes:
That's just too funny!
Not for XML, no. But I do have a half baked one for RSS. I aint publishing it cause it has no sanity checks. You admins here get it done ok, but "end users" would not get the desired result I bet and there's nothing to tell um so yet.
I'll have it all ready for vBulletin 3.5 soon.
ResaleBroker 06-25-2005, 09:46 PM I'll have it all ready for vBulletin 3.5 soon.Cool Beans! :)
nevetS 07-07-2005, 03:37 AM I just put this together for 3.5 using carp.
Step 1) Add a custom profile field for the RSS link. In my setup it was field5.
Step 2) Edit your postbit template as follows:
<if condition="$post['field5']">
<div class="smallfont">Recent Blog: $blogentry</div>
</if>
Step 3) Create a new plugin. I named mine: Carp Configuration. Attach it to the "global_start" hook location.
Here is the code:
require_once '/path/to/carp/carp.php';
CarpConf('cacheinterval',120);
/** You may want to set a cachepath specifically for your forum **/
CarpConf('cachepath','/where/you/want/your/cache/files/');
CarpConf('cacherelative',0);
/** You can omit the above two lines without a problem **/
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',1);
CarpConf('iorder','link');
Step 4) One more plugin. This one I called: Get Users Blog Entry
Attach this to hook location: postbit_display_start
ob_start();
CarpCacheShow($post[field5]);
$blogentry = ob_get_contents();
ob_end_clean();
That's it... away you go. If you don't have carp, you can check it out at: http://www.geckotribe.com/rss/carp/
I'm not sure if this will work with the free version, as I have the paid version.
I'm thinking about using grouper to set it up so I can parse atom files, but I don't know how important that will be.
Note: carp allows you to enter local paths and http paths for rss feeds. I've tried entering both in my user profile field successfully. You may want to disallow users from entering a local path just to be on the safe side.
minstrel 07-07-2005, 06:40 AM How do you manage to do this stuff with that baby squrming on your knee, nevetS? :D
noppid 07-07-2005, 07:26 AM I'm not so sure this is right. But since you wanted to top me, you can figure out why it's, one not done right and two half baked and three placed poorly.
minstrel 07-07-2005, 07:32 AM It was the baby... :o
nevetS 07-07-2005, 10:58 AM It wasn't about topping you. When I first looked at this thread (or maybe it was a similar thread) I didn't see the instructions. Then I did it and came back to post and saw what you did, but then it didn't have 3.5 instructions... so I posted mine. Didn't mean to steal your thunder.
As for:
1) not done right: I don't know. What do you mean by that? It seems to work for me.
2) half baked: I know pretty much nothing about vBulletin. This was my first attempt at a plug-in.
3) Placed Poorly: I'm imagining you are talking about the hook locations. The configuration stuff I only need once, and I tried putting it in thread_start, but it didn't work and then I realized I would need it in other places too. So I put it in global start. The $blogentry variable can change per postbit, so the logical place for me to put it was in postbit_display_start.
Now this works differently than yours - you have a cron job that regularly updates a database if I remember correctly from before I went to sleep. I think that probably is more performance friendly than my "find a place to put carp" cloogey hack, but then again carp automatically caches the files and you can easily change the CarpConf('cacheinterval',120); to have more or less frequent updates so my solution can't be that bad... (or maybe it is. Like I said, I don't know vbulletin and my forum isn't even live)
But certainly I'm willing to listen to suggestions and change things around. The point of posting something like this to a forum is to get feedback from people who do know the software.
Besides this isn't your idea. As far as I know it was Shawn's over at Digital Point, and personally I like his implementation best because it doesn't just work with any feed out there. Jeez... three problems with a 39 line post about a 17 line plugin. Maybe I should just go back and crawl into my cave.
By the way, this should work with the free version of carp. I looked through the feature comparison and it looks like there's nothing the free version wouldn't do.
noppid 07-07-2005, 11:49 AM Run with it. Have fun. I was a bit insulted by the positioning of the post. Maybe start a thread next time?
Listen, there are so few "original" ideas, I'll just take that dig and put it in my pocket. I disagree with your approach is all I can say. Sorry I took it personally.
nevetS 07-07-2005, 12:42 PM Hey... for whatever reason I took your post personally too. It's all good.
I'm curious as to how you'd do things differently, but I guess I'll see that when you release your version. Yours seems to have more thought put into it. Mine really is more of a "So I have carp, where do I put it" kind of solution.
noppid 07-07-2005, 12:45 PM I'm in way to deep to actually develop or test. But I'm thinking you at least need to get away from global_start.
To be honest, I don't like any of my ideas either. I don't even like Shawns Cron job Idea. But that's not to say it don't work or is a bad way per se'.
|
|