Bringing PHPRivals To SMF!

Started by CFCParadox, January 06, 2010, 03:13:02 PM

Previous topic - Next topic

CFCParadox

Hello SMF Community,

PHPRivals Website: http://phprivals.com/

PHPRivals is a MOD that is currently for PHPBB, MYBB and Vanilla. PHPRivals Package is compatible with all forum scripts but I had contacted the creator to ask if he could create it for SMF:

His first response was:

QuoteThe problem with SMF, is that you cant just drop an application in, its too
hard coded, any pages you want to add must be hard coded into the index, very
very unflexable, but im not saying it cant be done. phpRivals CAN be hard coded
into SMF to work and work fine, but thats not my goal, so until SMF advances or
I find a way around the hard coding, it wont happen sorry. Only way is for
rivals to be hard coded into it as well.

Thanks.

I then decided to ask him if the SMF community could possibly help him around his problems and compatibility. Here is his second message:

QuoteWell hello then :)

The main problem: is there an easy way to, a simple example, show "hey, I
work" on a new page without hard coding that new page into the Sources or the
actions in index.php?

If this can be done it would be so so much easier. Rivals handles its own
templates and spits out the formatted html, this is all I need to do is show
the formatted html on a page. But I greatly prefer if I didnt have to hard
code it into the actions of index and such. Even grabbing the header and
footer and spitting rivals content into the middle would work. Any suggestions
from you or your contacts would help this out greatly....

If I can figure it out, I can make a software class for it, because the whole
goal of rivals is that the same code works in every software weather forum or
cms without having to mod the core of the code to fit certain softwares.. this
is why/how rivals works in phpbb, mybb and vanilla all at the same time using
the same exact code.

Thanks,
Tyler

So, SMF Community I am here to request that we help get this amazing MOD into the SMF community by helping Tyler port it. As you can read above he has a few issues and I hope that customizers and other support staff could help with this. First we need some ways he can fix the problems listed above.

Thanks

-Paradox
characters remaining: 575

KensonPlays

I would like this mod for my gaming forum (in development)!!!

Owner of Mesozoic Haven

CFCParadox

characters remaining: 575

Arantor

All he has to do is require SSI.php at the start and it has immediate access to the currently logged in user's details. If he needs more information please have him contact me.

CFCParadox

characters remaining: 575

Arantor

I don't give that out because I'm terrible at replying to email.

He's free to PM me here though or post in Coding Discussion; it's really not a huge amount of work to integrate though with SSI.php.

KensonPlays

Are you talking to me? I have never used SSI, so is there a SMF Doc on it?

Owner of Mesozoic Haven

Arantor


KensonPlays

Oh, you didn't mention his name in the post and it kinda sounded like you meant me, sorry...

Owner of Mesozoic Haven

CFCParadox

Quote from: Arantor on January 06, 2010, 04:30:23 PM
I actually meant the PHP Rivals author is free to PM me.

More information on SSI:
SSI Readme
How do I integrate SMF into my PHP coded website?
How to use the SMF user system outside of SMF

I'll try to get him on the forums and replying to this support topic.
characters remaining: 575

CFCParadox

Just received another e-mail guys. He should be replying within the next hour! Aranator or someone... I hope you're here :)

Latest E-mail:

QuoteBrandon,

SMFs SSI? never herd of it :/. Would you be able to get one of your contacts
to e-mail me. I'd like to discuss ways of getting it to embed into SMF :) and
great to know there is good interest.

Thanks,
Tyler
characters remaining: 575

Dragooon

TBH it may actually be easier to rewrite a system for SMF.

Arantor

I don't provide support by email - ever. I'm happy to discuss it via PM or public posting here though.

KensonPlays

Aw, that's too bad, because ppl who have a gaming forum would love this!

Owner of Mesozoic Haven

TylerK

I am the creator of phpRivals. Paradox mentioned I should post here to get some help integrating it.

How rivals works is it uses software classes that are specific to each forum or cms, etc where the software class provides both the environment needed to spit out the rendered pages inside of the software and it provides all the user information needed. The whole point of it (and its successfully doing it) is to have the exact same code work in every software without having to change it to work in a specific software.

I'v never herd of this SSI, its new to me, is there any documentation on it? Pretty much, if possible, I need a way to spit out my rendering inside SMF's template. Any suggestions?

And @Dragooon: This exactly why I use software classes, to avoid rewriting everything for specific softwares because just say I add a new feature to the tournament brackets, I'd have to go through and edit files for another 3 or 4 softwares, thats hugely time consuming and is why I dont want to port it but embed it.

Thanks for all the help :)
Tyler

Arantor

Hi and welcome :)

Stuff from our manual on SSI:
SSI Readme
How do I integrate SMF into my PHP coded website?
How to use the SMF user system outside of SMF

Simply put: require('SSI.php') before any other headers have been issued (to make sure it can pick up session and cookies OK)

Then you can pull the authenticated user's id from the global variable $context, in $context['user']['id'] and name in $context['user']['name'] (will be 0 and blank respectively for a non-logged in user)

To integrate site layout, I think the functions are simply template_header() and template_footer() respectively. There's more you can do depending on how far you want to go (for example, there are ways to reset the title, the breadcrumb navigation trail, etc)

TylerK

Ah this would be perfect, especially the template_header and template_footer functions. I'll write a software class over the next couple of days and try it out! I do have a full time job and a family so bare with me if it takes more than a couple days, I do this out of my spare time :)

Thanks for the help! :)
Will write back soon.

JBlaze

Quote from: TylerK on January 07, 2010, 12:44:40 PM
Ah this would be perfect, especially the template_header and template_footer functions. I'll write a software class over the next couple of days and try it out! I do have a full time job and a family so bare with me if it takes more than a couple days, I do this out of my spare time :)

Thanks for the help! :)
Will write back soon.

There's also the obExit() function ;)
Jason Clemons
Former Team Member 2009 - 2012

KensonPlays

Hi tyler, cannot wait for it to be finished!!!

*SETS TO NOTIFY

Owner of Mesozoic Haven

CFCParadox

#19
I think I accomplished enough for today ;)

Sorry JBlaze about your latest project...

I just thought it would help SMF more by having a already well known software come to SMF! But I am sure your MOD would have been just as good too!

Tyler thanks for all the help and I can't wait to see it!

characters remaining: 575

Advertisement: