View Full Version : Active Topics 0.1 done
I've got a very rough copy of the vB compatible active topics done.
The file is on
http://www.gandmasti.net/forum/active.txt
The result is on
http://www.gandmasti.net/index2.shtml
or
http://www.gandmasti.net/forum/active.php
Mind you my board is a humor board and there might be offensive jokes on the active list, consider yourself warned!
This copy has several things I want to add, in the following priorities....
a) Template support
b) User defined number of topics / topics since last logon
c) RDF support (to allow others to take the list from your site dynamically)
d) WML support (to allow mobile phone users to get their humor fix via phones... also to allow me to admin / delete the forums via a mobile phone)
e) Clean up of the code / comments
f) Offline (low overhead) generation via cron
Good job shri!!
When they release 1.1.1 we gonna buy and I'll cut it and start working on some other stuff for it :)
What woudl it take to configure this so you can select the most recent posts from a) a particular forum and b) a particular category of forums or c) some combination of both?
thanks
Huss,
Not a lot. Just play with the select statements.
On the list of things to do.
However, my priority right now is to get the software to look and work like UBB to see if its worth upgrading a few more licenses to vB and putting it into production.
Shri
IN that list of things you want to acommplish...any eta?
:)
<replaced by post below>
[Edited by wandrer on 05-05-2000 at 09:46 AM]
http://www.glcomputers.com/Wandrer/PHP-Active-Topic2.zip
Now you can change the number of topics to display, the length of the message, and whether it is displayed to the browser or written to a user-defined file on the website.
http://www.someweb.com/forum/Active.php3?length=175&posts=15
will run the active-topics displaying 15 of the latest posts and a message length of 175 characters.
http://www.someweb.com/forum/Active.php3?length=250&posts=20&file=1
will run the active-topics displaying 20 of the latest posts and a message length of 250 characters writing the information to a user-defined file on the website.
The user-defined file is based on a template, so it could work with RDF, HTML, CVS, TXT, or any other format you wish it to be.
Also, because you can have it output to a file, you can run it via cron from the command line to update the file every x minutes/hours/days.
Email me if you have questions (wandrer@glcomputers.com)
---
Just changed it based on a comment above. You can now select the forums for it to display also:
http://www.someweb.com/forum/Active.php3?length=175&posts=15&forum=2
will only display topics from forum #2.
http://www.glcomputers.com/Wandrer/PHP-Active-Topic2-5.zip for the changes with forum selection...
[Edited by wandrer on 05-05-2000 at 10:05 AM]
Wanderer, NICE! Thanks :)
thanks for the compliment... and thanks for the first version of the software which you wrote...
[Edited by wandrer on 05-05-2000 at 12:34 PM]
all I get is a 404 error :(
where or what gives the 0404 error ?
The other links Martin are sample URL left for you to see how to use them I believe. The only live link above is for the .zip file.
If that is what you are referring to?
oops... my mistake... forgot to say they were sample links... yes, the only valid link is the .zip file...
can we see it in action anywhere?
I think, from what I saw of the code, it looks great :)
in all actuality, it runs the same. the only difference is that it is much easier (for me) to integrate the active-topic with my site. you don't have to edit the php file with html, just edit the page template and the message template.
As i don't have vbulletin configured/setup on the site I am working on, there wouldn't be much to show you if I could.
Nice job on the active posts.
I take it that when you say it uses a template, you're not referring to a vBulletin template?
I've spent a lot of time with this hack on the UBB trying to find a version that is low overhead. The best way to implement this hack is to hack the posting script so that every time a post is made, an entry is made to either a flat file or a database entry. That way, when the script is called, it only has to make one call/include one file. Also, unlike cron, it is always perfectly up to date.
Sorry, my mistake again... Yes, when I said template, it means a template separate from vbulletin.
I've spent a lot of time with this hack on the UBB trying to find a version that is low overhead.
That is the neat thing about PHP/mysql. Everything (within reason) is low overhead. I do not believe there is a way to make this script less overhead than it is now. If you are compairing it to UBB Active Topics, then it is so far below their overhead that it wouldn't show up on a graph. (imnsho)
To have this script up to date, just ssi it in your page.
To have a 'less overhead' version, have it output (via cron) to a text file and have the text file ssi'ed into your page. The more time between the output, the less overhead.
I have a list of topics called mythread.txt generated by this program.
I want to include them in my new homepage, which I"m building at index.php using vB as the backend. Index.php calls a variety of tempaltes liek homepage, etc, as well as some stuff from vB liek fivelinks.
I've got it all working except for two things. One is login on the homepage. The other is how to include the .txt file inside the template.help?
I'd think <? require("mythread.txt"); ?> should do it if you're calling it from a php file.
i have no problem requiring it in the php file. the problem is, i need the required active threads text to go in a specific part of the tempalte that generates the hp.
so ideally i want to set a variable = to the include or require and then print that variable whereever i want, but that doesn't work.
does that make sense?
Uhm, I'm not following you... :)
i wnat to call the include from a template, not from the php file
From what I recall this feature is being planned.
I get this error when I try to run it.
Fatal error: Call to unsupported or undefined function strip_tags() in /usr/www/users/******/forum/Active.php3 on line 154
I'm running PHP 4.0.0 as a cgi - I can't see why it doesn't understand strip_tags.
Any thoughts?
Originally posted by Mike
I get this error when I try to run it.
Fatal error: Call to unsupported or undefined function strip_tags() in /usr/www/users/******/forum/Active.php3 on line 154
I'm running PHP 4.0.0 as a cgi - I can't see why it doesn't understand strip_tags.
Any thoughts?
I was having a similar error message and couldn't quite figure out what the problem was, so I just edited the script a bit..
$latest_array["lastposter"],substr(($result_thread_array["pagetext"]),0,$num_chars),$latest_array["threadid"]);
NOTE - you'll need to edit the image paths to match your own settings.
I have it in place at http://www.wnsp.com/index.php3
What it does is leave the vB URL tags visible in the parsed results... it doesn't bother me all that much, since the site is so new and there's absolutely nobody using it yet. In fact, the station hasn't yet started advertising/plugging the site to their listeners...
Go ahead and test it out there if you want... I don't think it will break! ;)
RobRJ
Does anyone sees a chance to put the file-output into html-code?
Does anyone could post a sample line for calling this via cron, i know how to call perl-scripts via cron but php?
This is what I use for one of my sites:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sh activechat.sh
That just calls a shell script every 5 minutes called 'activechat.sh'
activechat.sh consists of:
-----
cd ~/active-chat
./php activechat.php >/dev/null
cd
-----
In the active-chat directory is a separate php 3.0 binary:
-rwxrwxr-x 1 myuser mygroup 1475784 May 9 10:44 php
that I use to run the files.
That is it. The activechat.php is just the active-topics file with the variable set to output to a file in the proper directory.
I know that there are other ways of doing it, but this works for me.
Does anyone knows how to exclude private forums from Active Topics?
Help! I set up the active topics and didn't give it another thought as it seemed to work fine. I then imported the posts and opened the board. Unfortunately, I never realised that it displayed the contents of private forums so, when we posted a note in one of the staff forums with a rather obvious title, it was displayed on our homepage! :( Although the users couldn't read the topic, the damage was done due to the topic title.
PLEASE could someone make an adjustment to the script to exclude private forums - kinda important, don't ya think ? :) I'd have a go myself, but i've not got a clue how it works :(
Craig,
If someone tells me the table forumpermission seems appropriate but I have no clue what the various items do, I can have this fixed very quickly.
Unfortunately like UBB the vB authors are taking a bit of an off hand approach to this .. :) so I guess it will be up to someone who knows the data structures to let me know.
</endrant>
Shri
Come on folks, can someone help shri out ?!
Also, the {POSTDATETIME} thingy doesn't seem to work - any ideas ?
imported the posts and opened the board. Unfortunately, I never realised that it displayed the contents of private forums so
for my active-topic implimentation, you just need to set the $forum variable when you call the script and it will just dump out the last topics by that forum.
make multiple copies of the script for each of the individual forums that you want to display.
Now, if you want to display the last topics sorted by newest post and have it exclude the private forums (or forums you don't want it to show) - all in one script, that might take a while for me to figure out.
I have, I think (I merged some when we switched to vB), 19 forums total - 3 of which are private. Would be kinda a big script, no ?
wandrer, have you 'figured' yet ? :)
Still waiting for John or someone to give me a hint...
I would also like to suggest a new feature for vB ..
"Alert Admin / Moderator"
Would send an e-mail to the concerned people that they need to view the post and respond.
Ok Craig.. here a quick dirty hack.
Change the first select statement to
select * from thread where forumid='1' or forumid='2' order by lastpost desc limit $num_active
Add the forums you want listed in the active topics output.
I've got the code on http://www.gandmasti.com/forum/act2.php and the text file is on
http://www.gandmasti.com/forum/act2.txt
E-mail me on shriram@chaubal.org if you have any urgent issues.. i'm subscribed to quite a few threads here and tend to ignore vbulletin messages some times...
One more suggestion to the vb guys ... "email list of monitored threads nightly" :)
Cheers,
Shri
Excellent work, shri, seems to work just fine!
Now, any idea how I can display the time of the post in the output ? Can't seem to get it to work ?
Craig, not figured it out.. they changed the time format with 1.1.2 .. not really on my list of priorities right now :) I just deleted it!
Yeah, not important, just would be nice :) Anyway, thanks for your help in sorting out the private forums problem - which /was/ important! :)
Craig,
Just curious.. what software did you use to create your top nav bar? I am clueless about graphics.... but it looks *cool*
Originally posted by shri
Craig,
Just curious.. what software did you use to create your top nav bar? I am clueless about graphics.... but it looks *cool*
I am not sure what program he used to achieve this, but it would be a fairly easy task in Photoshop. I agree that it is very well done as well. :)
Can't take any credit for this i'm afraid - a chum did it for me. I believe he used Photoshop though...
Just wondering if I can get this topic back on track :)
I thought it would be better if we could make and exclude rather than a select to ignore certain forums. I have tons of them and rather than writing all of them and keeping track of them I would prefer simply adding the handful I would like ignored. Thats how the activethreads I have for UBB works.
Jan
Can somebody post a link to where I can get the latest version of this?
The links in the previous messages are invalid
Cheers
Mark
I downloaded wanderer's script (shri's gives me 404) and I am a bit clueless how to proceed. Can someone please explain to me how I set this up, what I need to edit, and how exactly do I generate a file that has x number of posts from one specific forum?
Also, can I rename the files to have a .php extention, rather than a php3?
Thanks
Hello,
Can someone please post a link that works for Wanderers active topics hack.
Thanks.
Here it is (found on the page before):
http://www.glcomputers.com/Wandrer/PHP-Active-Topic2-5.zip
I have a little Problem with this hack.
The update-time is not shown on my active-page.
Ans how can I insert my header an footer?
Weird...I got a 404 error when I tried to access that before.
thanks
I am running this but would like to do so with a cron making a text file of this so it can be included into main page, and the cron updating that file hourly.
How would I go about this?
Thanks in advance...
I'v install the Active topic 0.1 ,and I works fine, but I don't wanna display any topic of my private and limited forums,what can I do?
Thanks in advance.:)
Really good job...
#Wanderer... your Link(zip) is down or im unable loading it. Could u check it ?
THX:_A_LOT
Try again. Very high load on system has since died down...
I have absolutely no luck getting this script. Seems I just get you main page always when trying to see the script. Is it still up?
Email me if you have problems getting the script and I will email it back to you.
I love this hack, and actually got it to work with my limited knowledge of php, but I'm wondering- how do I get active topics to display the text of the last post instead of the first? I'm sure it's something easy, so I figure I must be missing it!
Thanks,
TigerLily:)
I got it, and it was easy!
Go to line 144 in Active.php and change asc to desc:
$querythread="select * from post where threadid='$latest_array[threadid]' order by dateline asc limit 1";
so it looks like:
$querythread="select * from post where threadid='$latest_array[threadid]' order by dateline desc limit 1";
Works fine!! Wow! There may be hope for me yet!
TigerLily:)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.