php forum
php mysql forum
php mysql smarty
 
Page 8 of 9 < 1 2 3 4 5 6 7 8 9 >
Topic Options
#199741 - 08/23/05 09:08 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
It looks pretty good, however, it is best to call ultimatebb.cgi and let the UBB decide when to call ultimatebb.php. I do have a more updated version of this, but I haven't released it.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199742 - 08/23/05 09:44 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Hiya,

Are u gonna add this to that one or the other way around?

Btw, have u got any clue on how to get this php code to run outside a browser but on a command line like this: php-cli ubbnews.php?forum=1

so that one can use cron?

Top
#199743 - 08/23/05 03:07 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Quote:
Originally posted by Sub Zero:

It looks pretty good, however, it is best to call ultimatebb.cgi and let the UBB decide when to call ultimatebb.php. I do have a more updated version of this, but I haven't released it.



:sniff: i want lol... I'm usign the latest public version of this on one of my new sites that i'm planning on opening in sept wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199744 - 09/09/05 01:18 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Well, I found a bug...

I'm running the latest version and for once I'm using the section:
Code:
if ($count > 1)
        echo "

";
(before I left it as "" and used something else, but now i'm going for a more professional look)

What I'm seeing on my dev site is that the first entry ignores
Code:
if ($count > 1)
        echo "

";
Which kind of sucks as I get parts that run together...

Any ideas? This is the only thing that's holding development back right now (well, the only thing i need to worry about anyway); I've been coding up a storm lately...

You can see examples of this error by looking at the "Headlines" section, the first two entries mesh together vs using:
Code:
if ($count > 1)
        echo " &#0124;&#0124; ";
And the "Tech News" section the first two stories mesh together instead of using:
Code:
if ($count > 1)
        echo "

";
(Note that the headlines are generated from a file named "headlines.php" and news from "news.php" so they aren't in the same file)...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199745 - 09/09/05 09:48 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
You might want to verify your changes. The $count > 1 is that way so that it does the 2 line breaks after the 1st iteration of the script. My guess is that $count isn't being incremented during the 1st pass.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199746 - 09/09/05 07:05 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
The only changes I made was to the formatting and the line which is responsible for the amount of stories allowed to pull... I'll get a copy uploaded for you shortly

files
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199747 - 09/10/05 12:06 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
Change $count > 1 to $count >= 1. The problem is $count = 0 at first, then gets incremented to 1 and the line break logic doesn't get called.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199748 - 09/10/05 04:44 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Ahh, that's looking beautiful; thanks smile ...

Now to go terrorize more php code!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199749 - 09/12/05 12:07 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
Zip File Updated.

Fixes
======
- Fixed the Gizzy $count bug
- Changed the include to require for vars_config.inc.php (Why try to run if you cannot fetch the paths confused )
- Tweaked the internal code documentation
- Cleaned up the formatting of the code for easier reading (I should have done this sooner)
- Switched the URLs to Spider Friendly

I'm going to mark this as a Finished Modification since it does seem rather stable.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199750 - 09/12/05 12:16 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
Zip File Updated again because I forgot to leave the old URL formats in for the 6.4 Users. If you do not want the short URLs or are unable to run with them, you may comment the lines with them and uncomment the lines with the standard URLs.

Example Before:
Code:
		$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;
		//$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
Example After:
Code:
		//$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;
		$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199751 - 09/12/05 09:16 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Hey SubZero, I'm currently working on a rendition of the body of UBB.News that will provide a valid RSS2.0 feed; would it be allright if I can post the body segment here when completed?

The hardest task is to get a valid date lol, they want it one way whereas it's presented another ;/, too bad that for a valid feed we had to sit and code for a while to get it to output a differant way without modding existing ubb code :/; but we coded a fix for that one wink .
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199752 - 09/12/05 09:37 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
I could probably help you out with the date handling Gizzy. I do see that it is tricky. You are probably going to have to do some kludge to get the current server Time Zone and assume that the FudgedOffset is 0. Then again, you could do some math on FudgedOffset from vars_config.inc.php and figure out the new timezone.

Possibly at some point, the RSS 2.0 stuff could either be a "hack" to the code, or we might be able to make some arrangements and ship it as stock behavior. We should probably discuss what we want to do privately if that is something we want to consider smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199753 - 09/13/05 12:26 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Well the timezone for RSS has to be in an exact format; we have a discussion at ugn here on the subject though wink ...

PM me later and i'll get you what i have right now; the only thing not rss2.0 compliant is the date which would be fixed via the forum thread we have going.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199754 - 09/13/05 11:21 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
http://www.ianspence.com/?page=rss

smile

First, use the following function

Code:
function convert_date($ubb_time)
{
	return preg_replace("/(d{1,2})-(d{1,2})-(d{4})/", "\3-\1-\2", $ubb_time);
}
Pass in the normal UBB time you get (DATE blank space TIME)

Then
Code:
$date = date( "D, d M Y H:i:s T" , strtotime( convert_date( $day . ' ' . $hour ) ));
_________________________
Code monkey like Fritos

Top
#199755 - 09/14/05 01:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Ian, not bad, however it sets the time as "00:00:00" vs the time of the post smirk
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199756 - 09/14/05 01:13 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
are you entering the entire time. by $hour I meant "05:15 PM"
_________________________
Code monkey like Fritos

Top
#199757 - 09/14/05 10:51 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
I just dropped it in and called it as you said... BTW, "am/pm" isn't in the spec, it's 24 hour time I believe.

SubZero, a reccommendation, instead of commenting the shorturl capabilities why not just add a switch?

Add this to the top:
Code:
// Use ShortURLs? 1 = yes, 0 = no.
	$shorturls = "1";
Then add this before you define your layout:
Code:
			if($shorturls == 1) {
				$authorurl = $CGIURL . "/ultimatebb.cgi/profile/" . $authorid;
				$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;
				$commentpath = $CGIURL . "/ultimatebb.cgi/ubb/reply/f/" . $forum . "/t/" . $topicnum;
			} else {
				$authorurl = $CGIURL . "/ultimatebb.cgi?ubb=get_profile;u=" . $authorid;
				$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
				$commentpath = $CGIURL . "/ultimatebb.cgi?ubb=reply;f=" . $forum . ";t=" . $topicnum;
			}
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#199758 - 09/14/05 11:27 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
I only did the comment method because it was a quick fix. I will look at adding it as a switch shortly. My schedule is kinda...crappy this week smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199759 - 09/15/05 01:09 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
Zip File Updated
- New optional Query String parameter - surl=1 will enable Short URLs (Requires UBB.classic 6.7.x)
- Fixed some typos in the comments
- Added a few additional comments
- Cleaned up some of the nodots logic

Reverting this back to a beta hack for the time being.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199760 - 03/28/06 06:11 PM 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: 25452
Loc: Texas
Does this do rss 2.0 feeds? I saw someone at ubbcentral requesting the ability.
_________________________
- Allen wavey
- What Drives You?

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


Moderator:  Charles, Gizmo 
Who's Online
0 registered (), 25 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Spell Check [beta]
by Gizmo
Today at 06:21 PM
PhotoPost BB Code Popup
by AllenAyres
Today at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Today at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Today at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks