PDA

View Full Version : Active Topics 0.1 done


01 May 2000, 06:39
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

01 May 2000, 06:52
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 :)

01 May 2000, 20:11
great work :)

03 May 2000, 01:59
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

03 May 2000, 02:10
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

04 May 2000, 09:08
IN that list of things you want to acommplish...any eta?

:)

04 May 2000, 14:20
<replaced by post below>

[Edited by wandrer on 05-05-2000 at 09:46 AM]

05 May 2000, 02:45
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]

05 May 2000, 05:15
Wanderer, NICE! Thanks :)

05 May 2000, 05:34
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]

05 May 2000, 07:36
all I get is a 404 error :(

05 May 2000, 07:38
where or what gives the 0404 error ?

05 May 2000, 07:41
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?

05 May 2000, 07:47
oops... my mistake... forgot to say they were sample links... yes, the only valid link is the .zip file...

05 May 2000, 07:57
can we see it in action anywhere?

I think, from what I saw of the code, it looks great :)

05 May 2000, 08:09
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.

05 May 2000, 10:44
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.

05 May 2000, 11:47
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.

11 May 2000, 04:33
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?

11 May 2000, 04:40
I'd think <? require("mythread.txt"); ?> should do it if you're calling it from a php file.

11 May 2000, 04:54
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?

12 May 2000, 01:53
Uhm, I'm not following you... :)

12 May 2000, 02:04
i wnat to call the include from a template, not from the php file

12 May 2000, 02:06
From what I recall this feature is being planned.

24 May 2000, 07:20
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?

24 May 2000, 07:59
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..



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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

26 May 2000, 02:41
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?

26 May 2000, 03:03
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.

31 May 2000, 22:48
Does anyone knows how to exclude private forums from Active Topics?

05 Jun 2000, 17:46
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 :(

05 Jun 2000, 18:04
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

06 Jun 2000, 08:21
Come on folks, can someone help shri out ?!

Also, the {POSTDATETIME} thingy doesn't seem to work - any ideas ?

06 Jun 2000, 10:05
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.

06 Jun 2000, 10:20
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 ?

08 Jun 2000, 04:50
wandrer, have you 'figured' yet ? :)

08 Jun 2000, 04:57
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.

08 Jun 2000, 05:09
Ok Craig.. here a quick dirty hack.

Change the first select statement to



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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

08 Jun 2000, 06:32
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 ?

08 Jun 2000, 06:36
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!

08 Jun 2000, 06:38
Yeah, not important, just would be nice :) Anyway, thanks for your help in sorting out the private forums problem - which /was/ important! :)

08 Jun 2000, 06:43
Craig,

Just curious.. what software did you use to create your top nav bar? I am clueless about graphics.... but it looks *cool*

08 Jun 2000, 07:09
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. :)

08 Jun 2000, 07:21
Can't take any credit for this i'm afraid - a chum did it for me. I believe he used Photoshop though...

14 Jun 2000, 20:35
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

18 Jun 2000, 23:32
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

19 Jun 2000, 02:21
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

03 Aug 2000, 09:02
Hello,

Can someone please post a link that works for Wanderers active topics hack.

Thanks.

03 Aug 2000, 14:33
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?

03 Aug 2000, 14:58
Weird...I got a 404 error when I tried to access that before.

thanks

13 Aug 2000, 01:29
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...

26 Aug 2000, 15:20
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.:)

12 Sep 2000, 20:28
Really good job...

#Wanderer... your Link(zip) is down or im unable loading it. Could u check it ?


THX:_A_LOT

12 Sep 2000, 21:35
Try again. Very high load on system has since died down...

13 Sep 2000, 00:54
Thx Now it works ;)

25 Sep 2000, 16:59
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?

25 Sep 2000, 17:37
Email me if you have problems getting the script and I will email it back to you.

03 Nov 2000, 21:38
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:)

04 Nov 2000, 17:41
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:)