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
I would like this mod for my gaming forum (in development)!!!
Quote from: Kcmartz on January 06, 2010, 03:25:34 PM
I would like this mod for my gaming forum (in development)!!!
SAME! :P
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.
What is your e-mail address?
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.
Are you talking to me? I have never used SSI, so is there a SMF Doc on it?
I actually meant the PHP Rivals author is free to PM me.
More information on SSI:
SSI Readme (http://docs.simplemachines.org/index.php?topic=400.0)
How do I integrate SMF into my PHP coded website? (http://docs.simplemachines.org/index.php?topic=461.0)
How to use the SMF user system outside of SMF (http://docs.simplemachines.org/index.php?topic=789.0)
Oh, you didn't mention his name in the post and it kinda sounded like you meant me, sorry...
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 (http://docs.simplemachines.org/index.php?topic=400.0)
How do I integrate SMF into my PHP coded website? (http://docs.simplemachines.org/index.php?topic=461.0)
How to use the SMF user system outside of SMF (http://docs.simplemachines.org/index.php?topic=789.0)
I'll try to get him on the forums and replying to this support topic.
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
TBH it may actually be easier to rewrite a system for SMF.
I don't provide support by email - ever. I'm happy to discuss it via PM or public posting here though.
Aw, that's too bad, because ppl who have a gaming forum would love this!
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
Hi and welcome :)
Stuff from our manual on SSI:
SSI Readme (http://docs.simplemachines.org/index.php?topic=400.0)
How do I integrate SMF into my PHP coded website? (http://docs.simplemachines.org/index.php?topic=461.0)
How to use the SMF user system outside of SMF (http://docs.simplemachines.org/index.php?topic=789.0)
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)
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.
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 ;)
Hi tyler, cannot wait for it to be finished!!!
*SETS TO NOTIFY
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!
Here was me thinking his top secret project was already in his sig... ;)
LOL I just noticed his new project :P
I wonder what it is...
Never heard of this software and now I wish I didn't find this thread until the smf version was done, because I want it so bad. lol
Had a few minutes tonight to write up the software class for SMF. Its working, it don't look pretty (all editable through css and templates) but it works :)
Screenshot: http://img46.imageshack.us/img46/9414/banking2.png
Visit: http://www.phprivals.com/ and click the download page to download the newest package. Once downloaded read the README file.
This has been requested so so many times for SMF, so I hope you all appreciate it :) but do remember its BETA so your bound to find a few bugs here and there (I recently rewrote the tournament system so expect some there).
Any comments are welcome :) post any bugs you find on phpRivals' bug forum.
Thanks for the support and interest :)
Tyler.
What versions of SMF is it tested on? 1.1.11? 2.0 RC2?
Just to let you know, I get this error when installing:
Warning: require(../SSI.php) [function.require]: failed to open stream: No such file or directory in /home/content/k/c/m/kcm93/html/rivals_app/core/software/smf/software.php on line 33
Fatal error: require() [function.require]: Failed opening required '../SSI.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/k/c/m/kcm93/html/rivals_app/core/software/smf/software.php on line 33
Quote from: JBlaze on January 08, 2010, 01:13:57 AM
What versions of SMF is it tested on? 1.1.11? 2.0 RC2?
looks like 1.1.10 or 1.1.11...
That means it can't find SSI.php.
@TylerK, try using dirname(__FILE__) . '/SSI.php instead of ../SSI.php
what should I edit or change to make that work, the install directory? the folder it is in when it is done? What do you think?
I know, JBlaze, that you are not familiar with this, just what do you think?
I have no idea how it is coded and have no intention of opening it.
If you want to find it, look in software.php and see where SSI is being called and also what directory software.php is in.
it is located in *ROOT*/core/software/smf/**filename**
$path = '../../';
}
require ( '../SSI.php' ); }
/*
* Environment class is used to parse the template,
This is the line it is on (with wordwarp on)
This is probably a stupid question, but what does this game do exactly?? From the description at the site, I can tell that it is a game that has the latest jQuery UIs. And stuff about ladders, clans, etc.. But it says absolutely nothing about what it's actually for?? Or what it brings to your forum(s). I'm not big on Forum games, so please forgive me if I've never heard of this game, if it is even popular. Just curious, as the title sort of implies that you battle against others using php code. Is this true? If so, it sounds like it could be a lot of fun, but just wanna be sure of this in any case.
Thanks
require ( '../SSI.php' );
require(dirname(__FILE__) . '/SSI.php');
It is not a game. go to http://www.phprivals.com (http://www.phprivals.com), and on the bottom left, read those two short paragraphs...
JBlaze: Thanks!
ATTACHMENT: JBlaze's fixed file...
EDIT: ATTACHMENT Doesn't work, i tried it, reuploaded edited file... ...,....
Quote from: SoLoGHoST on January 08, 2010, 01:40:13 AM
This is probably a stupid question, but what does this game do exactly?? From the description at the site, I can tell that it is a game that has the latest jQuery UIs. And stuff about ladders, clans, etc.. But it says absolutely nothing about what it's actually for?? Or what it bring to your forums. I'm not big on Forum games, so forgive if I've never heard of this game, if it is even popular. Just curious, as the title sort of implies that you battle against others using php code. Is this true? If so, it sounds like it could be a lot of fun, but just wanna be sure of this in any case.
Thanks
It's not a game. It's a clan management/ladder system.
http://www.google.com/search?q=clan+ladder+system
Ohh, ok. Duh, feeling way out of my league here....
Thanks
Attachment doesn't work...
Are you getting this error on install or in general use, because if your getting the error on the install page I may know why.
yes, on the install, right after "submit" button...
redownload package replace the core/software/smf folder and make sure no config.php is in your rivals_app folder. see if it fixes the error.
replace the core/software/smf folder, then how will it work for SMF?
I tried, and it didn't fix it...
...Wait, is this for 1.1.11, 1.1.10, or 2.0RC2?
Ya sorry forgot to upload the zip stupid me, try again and yes replace the smf folder.
Ok, replaced with updated files and still get error, I will try replacing all files in package...
I hope this is for 2.0RC2 :(
I tried installing it on my 2.0RC2 forum and got this error right after:
Fatal error: Call to undefined function db_query() in /home/combatc1/public_html/forums/rivals_app/core/software/smf/software.php on line 147
Okay so I have done 2 installs with PHPRivals.
First install was with 2.0RC2 which ended up with this error:
Fatal error: Call to undefined function db_query() in /home/combatc1/public_html/forums/rivals_app/core/software/smf/software.php on line 147
Link: http://combatfps.com/forums/rivals_app/index.php
Second install was with a fresh version of 1.1.11 which ended up with errors too and here is a link:
Link: http://combatfps.com/smf1.1/rivals_app/index.php
Hopefully Tyler can add 2.0RC2 compatibility too!
Yes currently only with SMF1.1 its working (and ill look into thoes notice errors). ill add SMF2 support sometime this week... anyone got any docs on SMF2 so I can make the software class for it?
Thanks,
Tyler
For SMF 2 you'll be using our lovely $smcFunc DB layer.
General notes on customising SMF (http://www.simplemachines.org/community/index.php?topic=214513.0)
SMF 2.0 Database Functions (http://www.simplemachines.org/community/index.php?topic=224166.0)
Good Luck Tyler!
Had a chance to write the SMF2.x class. Works for me... http://img138.imageshack.us/img138/9457/banking3.png
So, redownload the entire package again and install it in SMF2 (hopefully no bugs lol), select SMF2 as software at the installer page. I hope you all appreciate it :)
Thanks
Tyler.
I haven't tested it, but on behalf of the community, I'd like to thank you for putting this effort in :)
Just tested it on SMF RC2.
I believe both 1.1.11 and SMF RC2 have the same error:
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/combatc1/public_html/forums/rivals_app/core/rivals_plugin.php on line 89
Here is my Rivals Install: http://combatfps.com/forums/rivals_app/
I can't wait for the final version Tyler! Do you think you could also customize mine too?
Edit: And does the PHPBB version have the ladders on it too? Or does it still have to be added for all versions?
Thanks :) I will have that error fixed tomorrow afternoon. phpRivals is completely extendable through plugins, so yes I can customize but I am not taking any customizations until I have a fully stable release :)
Thanks for your support.
Tyler.
Okay I'll be waiting :)
Will the ladders also be added too?
I'm quite impressed. Thank you very much for putting in so much hard work everyone, especially TylerK. I will be interested to try this out on my site soon.
Quote from: CFCParadox on January 08, 2010, 10:59:10 PM
Okay I'll be waiting :)
Will the ladders also be added too?
What do you mean? phpRivals already features a tournament, clan and
ladder system
oh sorry I meant portal
Cannot wait!!!
Oh ya I plan to write a bunch of plugins for the portal, to show basic stuff like maybe top clans, new clans, up comming tournaments. but not yet :) soon. Hope you all enjoy the mod :) n3rve is looking into making a SMF package for it I believe which will add a tab to the menu bar and such.
Thanks for all your hard work Tyler and we're all glad to have someone as dedicated as you, improving the SMF community.
But has the error been fixed yet?
You posted this here? I didn't see the topic until now :/
Great that it's coming to SMF still, will help out ALOT of sites.
Quote from: iKorp on January 10, 2010, 08:23:01 AM
You posted this here? I didn't see the topic until now :/
Great that it's coming to SMF still, will help out ALOT of sites.
LOL I told you I was working on it...
Edit: We'll be waiting for your error fix Tyler!
Oh Tyler please reply when you fix the error for SMF 2.0!
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/combatc1/public_html/forums/rivals_app/core/rivals_plugin.php on line 89
Thanks
That plugin error should be fixed. Redownload replace the core/rivals_plugin.php file with new one in zip, let me know if it helps.
Thanks.
I got this error:
Database Error
Duplicate column name 'clan_session'
File: /home/combatc1/public_html/forums/rivals_app/core/software/smf2/software.php
Line: 147
Back
Yeah I did a fresh install 3 times and the same error occurs.
If your talking about the clan session error, you forgot to remove clan_session from members table when you did a fresh install.
Pre-release testing FTW ;)
It won't even let me past the install page!!!!!
Suggestion if I may...
For those that are using this thing, start up a vanilla forum on your server or on a localhost. Then test the mod to make sure it works completely before installing on your main site ;)
Saves alot of stress.
I kinda did...
MY 666TH POST!
BTW: I have moved this to Portals Bridges and Integrations rather than support.
That is ok...
EDIT:
I just get a blank page:
http://www.kcmartz.com/TestForum/r_a/index.php
When I was doing my fresh install I deleted all the tables and files and still received the same clan error.
@Kcmartz: try not renaming the folder? dunno if that would help
@CFCParadox: Your going to recieve the error if you didnt remove clan_session from members table.
Tyler, I always rename it to "clan"
I just did a fresh install its workin for me... ill try agin in a bit though.
Hmm that was weird O_O
It seems to be working fine now.
I just got that error and it disappeared...
Anyways thanks Tyler!
Okay when trying to add a clan, platform, season I get different codes but they are all similar when I submit it.
Here is what I got when I was trying to submit a clan:
EXCEPTION CLASS: db_mysql_exception
MESSAGE: SQL query has failed.
SQL: INSERT INTO rivals__clans (clan_name, clan_tag, clan_info, clan_joining, clan_tournaments, clan_leader) VALUES ('Cool', 'asdf', 'asdf', 1, '', 1537)
SQL Error: Table 'combatc1_smf1.rivals__clans' doesn't exist
[/home/combatc1/public_html/forums/rivals_app/core/dbal/db_mysql.php] (137)... db_mysql->sql_insert(rivals__clans,Array);
* 142
'clan_tournaments' => '',
* 143
'clan_leader' => ( $user_id == 0 ) ?
* 144
registry::$user->user_id :
* 145
$user_id )
* 146
);
* 147
}
* 148
* 149
/*
* 150
* Edits a clan in the database.
* 151
*/
* 152
public function edit_clan ( $clan_id, $data )
TRACE
* 1
[/home/combatc1/public_html/forums/rivals_app/core/rivals_clan.php] (147) db_mysql->sql_insert(rivals__clans,Array);
* 2
[/home/combatc1/public_html/forums/rivals_app/add_clan.php] (83) rivals_clan->add_clan(Array);
* 3
[/home/combatc1/public_html/forums/rivals_app/index.php] (99) add_clan->submit();
When I looked at the clan list there was nothing there too.
Check your db see if there is a rivals_clans table.
Yes there is a rivals_clans table.
Its looking for rivals__, two underscores, whats TABLE_PREFIX value in your config.php?
What do you suggest tyler? On my test forum it installed, but when I navigate to url through address bar in firefox (URL IS: http://www.kcmartz.com/TestForum/r_a/) Try navigating,
now I get a:
Quote
Failed to connect to database. Wrong host, username or password.
Quote from: TylerK on January 11, 2010, 07:04:14 PM
Its looking for rivals__, two underscores, whats TABLE_PREFIX value in your config.php?
I'm using the rivals_ prefix.
Want me to change it?
Okay I re-installed with the prefix of: rivals
It works ALMOST perfectly now! I just still get that clan error but going back to the main directory everything is fine.
Thanks Tyler. Hope the Portal comes soon :)
Quote from: Kcmartz on January 11, 2010, 07:11:26 PM
What do you suggest tyler? On my test forum it installed, but when I navigate to url through address bar in firefox (URL IS: http://www.kcmartz.com/TestForum/r_a/) Try navigating, now I get a:
Quote
Failed to connect to database. Wrong host, username or password.
Check you config.php
And how did you like it like that? I wanted to make mine: http://www.combatfps.com/forums/leagues/
2 More Problems :P
1. How can you add a title to the index.php so I can make it say something like Combat FPS League.
2. Words do not fit: http://combatfps.com/forums/rivals_app/index.php?class=clan_profile&clan_id=2
Thanks
1 More Problem
1. When you go to Manage Platforms > Add A Ladder ... It does not work and redirects you to a weird page...
http://combatfps.com/forums/rivals_app/index.php?class=acp/acp
Thanks
Edit: More Problems...
When you go to: http://combatfps.com/forums/rivals_app/index.php?class=add_clan and you already added a clan...
It says: Sorry, only one clan per user.
But then there's some overlapping and I can see another forum menu below that. It's really weird.
But PHPRivals is almost there for SMF!
Please post all bugs to phprivals.com and read the HOWTO post a bug topic. Hard to keep track of them here, and btw a work around for the renaming of the folder.. for now you can URL rewrite it with mod_rewrite to fake it.
Thanks.
I can't seem to register on your PHPBB Forum/site using Mozilla and IE...
Edit: Is is also possible to change what the portal says so I can put some temporary images and text there?
Should be fixed now, and yes, for now edit templates/portal.html
is this working with smf2.0...?
i am so hopeful of something like this for my community.
where is the download link for this, is it installed same as normal smf packages. anything different I have to do?
cheers for any help. :)
Ummmm. I read page after page, and every post in this topic. Where exactly is the download for this to use with smf 1.1.11?
All I've seen is a link to download phpRivals, and no list of smf compatibility.
hcfwesker, go to phprivals.com, then download and download it. then extract, upload and go through install, "SMF" and "SMF 2" are choices for install...
Thanx for replying. Sad thing is I'm so new to this. Only been on smf for a month. So all this zipping and extracting is new to me. I found this.
1. Put the rivals_app folder into your root myBB directory. <-- I'm assuming it meant to say SMF
2. Run install/ in your browser window.
And when I extract, and just try to upload the rivals_app folder itself, uit won't let me, it just open the next folders; what's the trick to just uploading the folder. The zip itself won't, so, now I'm lost.
Unless I have to manually create each folder, and upload each file 1 by 1 :(
Quote from: hcfwesker on April 14, 2010, 09:04:50 PM
And when I extract, and just try to upload the rivals_app folder itself, uit won't let me, it just open the next folders; what's the trick to just uploading the folder. The zip itself won't, so, now I'm lost.
Unless I have to manually create each folder, and upload each file 1 by 1 :(
What FTP client are you using? Try CuteFTP or SmartFTP, they both allow simple drag n drop uploads which makes things very easy.
Alternatively try http://www.net2ftp.com, if memory serves me correctly, they allow folder uploads as well.
Gluck.
I've never used FTP before. I tried it, but I could never even get my actual files from my cPanel to show up, so I just handle everything in the File Manager.
I have the SMFrivals MOD, it's a neat system, but it's really unorganized, and I heard PHPrivals is the better of the 2.
I'm just facing a brick wall right now on how to actually get it added.
It seems to be something wrong with it, in localhost, when I try to enter it says:
Notice: Undefined variable: slogan in C:\xampp\htdocs\test\Sources\Load.php(1751) : eval()'d code on line 31
Warning: require_once(SSI.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\test\Sources\Load.php(1751) : eval()'d code on line 15
Fatal error: require_once() [function.require]: Failed opening required 'SSI.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\test\Sources\Load.php(1751) : eval()'d code on line 15