php forum
php mysql forum
php mysql smarty
 
Page 1 of 9 1 2 3 4 5 6 7 8 9 >
Topic Options
#199601 - 04/01/03 10:53 PM [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
* Updated September 15, 2005
ubbnews.php
Modification and Redistribution of this code without perission is prohibited
The Official Code can be found at http://www.ubbdev.com/ubb/ultimatebb.php/topic/33/42.html

Reads the UBB for the latest topic in a forum, and displays a teaster of it on a page
Required Parameter -- forum=## where ## is the forum number requested
Optional Parameter -- threads=# where # is the number of threads to tease (5 limit)
Optional Parameter -- surl=1 will turn on Spider Friendly URLs (Requires 6.7.x)

Usage: just do an include with "http://yourdomain.com/path/ubbnews.php?forum=##&threads=X(&surl=1)" where ## is the number of the forum without any leading zeros and X is a number between 1 and 5. You will need to put your noncgi path in the script so it may read the vars_config.inc.php for your UBB paths.
Download: UBBDev
Requires: 6.4+

Features:
- Counts your comments and puts the count next to the Comments Link
- Comments Link will give them UBB Reply Screen
- Read More takes them to the entire topic
- Will display 1 topic of no threads=X is added to the URL
- Feed multiple forums by doing multiple includes of the ubbnews.php
- Will NOT feed private forums
- Will display a message if your forum_##.threads file is missing
- Author's name links to their profile
- Spider Friendly URLs

Known Issues:
- Doesn't process Gramelins This can be corrected by placing ubbnews.php in your noncgi directory
- Sometimes doesn't process URL's correctly (I've seen it on rare occasions, but bumping the Max Characters setting noted in the code should cure it)
- You will receive a missing .threads error message after an upgrade. Rebuild your Forum Metadata on that forum to correct this error.

This may/may not work on earlier versions, so use at your own risk.

I put a hard limit of 5 in the PHP code to prevent the code from trying to tease every topic in the forum (Could kill performance). You can change this by editing
Code:
       if ($threads > 5)
          $threads = 5;
just change the 5 in both lines to whatever you want to cap it at. I honestly don't see a need to be over 10.

Also, this may show a bit of lag if you have thousands of topic in the forums. I haven't tested this on large forums.

August 26, 2005 Notice
UBBFeed was an unauthorized modification of the UBBNews code and I will provide NO support for UBBFeed, or my code contained in it. Posting here for support of UBBFeed will result in an unpleasant response.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199602 - 04/01/03 11:18 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Any demo (of what you have so far)? This sounds very promising. If you can get it so that the user can determine how many "teasers" that are displayed (other than default "1") that would be cool. smile
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#199603 - 04/02/03 12:59 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25365
Loc: Texas
demo: http://thegeeksinc.com/

nice work Ron laugh the graemlins shouldn't be too difficult, I believe we worked through them for ubbnews and for a threads mod smile
_________________________
- Allen wavey
- What Drives You?

Top
#199604 - 04/02/03 04:50 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Quote:
quote:
Originally posted by AllenAyres:
demo: http://thegeeksinc.com/
OOPS...I feel quite <-- thumbsup
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#199605 - 04/02/03 08:26 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Thanks guys smile

I only wanted to tease one thread (the latest) but it could probably be modified to do more. You can feed more than one forum by doing multiple includes of the .php
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199606 - 04/02/03 03:20 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Quote:
quote:
Originally posted by Sub Zero:
the vars_config.inc.php for your UBB paths.

Feel free to suggest any improvements to the code, as I'm still learning PHP smile This may/may not work on earlier versions, so use at your own risk.
vars_config.inc.php is different in 6.4, so i any one wants to use it on 6.4.x u have to change the link towards the the topic.

Top
#199607 - 04/06/03 10:26 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
6.5 Zip File Updated with a bugfix - ultimatebb.cgi was not in the URL

Patch: Add /ultimatebb.cgi before ?ubb= on lines 52 and 56
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199608 - 04/13/03 01:21 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25365
Loc: Texas
changing the
to
would fix the xhtml-compliance smile

What do you see when you have graemlins in the post sz? some html? <img src=" etc?
_________________________
- Allen wavey
- What Drives You?

Top
#199609 - 04/13/03 02:00 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
The best way to check if it cuts any HTML command (including graemlins, images, etc) is to check the number of <'s in comparison to the number of >'s, and if there are more <'s just remove everything after the last <, including it.

For example if it is:
Quote:
quote:
This is a sample sentence! <b>Welcome</b> to our board! <img src="gr...
Then it can see there are 3 times "<", but only two times ">", so it removes everything after and including the last <, which is "<img src="gr..."
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#199610 - 05/24/03 04:28 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Stamoulis Offline
Member

Registered: 09/17/01
Posts: 92
Loc: Germany
its not really working for me on 6.4, what do I do wrong confused

http://www.greek-forum.de/ubb/ubbnews.php?forum=46

Top
#199611 - 05/29/03 10:49 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Sorry for the slow reply. I checked it out. You are running 6.4.0.1, and I wrote this on a 6.5 board, so there might be some differences, but it should work.

Also, you really should get your host to upgrade your PHP as you are running 4.0.6. The exact problem is the way I get the query string (?forum=46) must not be recognized on the older version of PHP. Either way, I would recommend upgrading the PHP as there are some vulnerabilities fixed.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199612 - 05/29/03 11:16 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Stamoulis Offline
Member

Registered: 09/17/01
Posts: 92
Loc: Germany
hmmm it's my own server so I have to upgrade it by my own, oh well, i will try this then wink tipsy

Top
#199613 - 08/25/03 08:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5091
Loc: Portland, OR, USA
Sub, anyway to have it relay the last 5 or so stories?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199614 - 08/27/03 08:35 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Right now, it only teases one. When I figure out a sane way to parse the necessary files, I will expand it.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199615 - 08/27/03 09:49 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5091
Loc: Portland, OR, USA
Ok, can't wait to see it smile ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199616 - 09/13/03 07:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
The Zip file has been updated with a new version that now allows a tease upto 5 topics.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199617 - 09/13/03 09:59 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5091
Loc: Portland, OR, USA
yey! anyway to make it 15 :x
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199618 - 09/13/03 10:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5091
Loc: Portland, OR, USA
nm, i see it :x... thanks sub!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199619 - 09/14/03 12:05 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus
Developer

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
The limit is in there to prevent someone from trying to crash the server by doing threads=99999 smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199620 - 09/16/03 02:36 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5091
Loc: Portland, OR, USA
yeh, i see how to mod it to allow what i need, I love this mod, now I can begin to use it for my implimentation of taking over the world... err umm news posting...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
Page 1 of 9 1 2 3 4 5 6 7 8 9 >


Moderator:  Charles, Gizmo 
Top Posters Last 30 Days
AllenAyres 83
Gizmo 28
Zarzal 21
sirdude 19
blaaskaak 14
willing 7
swebs 6
Who's Online
0 Registered (), 46 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
[7.3.x] ubb.links
by AllenAyres
Yesterday at 06:15 PM
Changing currency for subscriptions?
by AllenAyres
Yesterday at 01:15 PM
Protect users emails
by AllenAyres
Yesterday at 11:36 AM
VPS and Newbies
by Gizmo
07/02/08 09:08 PM
Team UBBDev Rides Again!
by AllenAyres
07/02/08 11:38 AM
Drupal / UBB integration module for Drupal
by blaaskaak
06/30/08 01:52 PM
[7.3.x] Scheduled board close for backup
by AllenAyres
06/30/08 12:51 PM
New Mods
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3+] CustomTag - Audo Embedding
by Gizmo
06/24/08 07:52 PM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
Newest Members
ryzilla, M4D, Jer, Kanigo2, Bubba
13302 Registered Users

 

 

 
fusionbb message board php hacks