The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
a few questions about user ids in battle.php Details »» | |||||||||||||||||||||||||||
a few questions about user ids in battle.php
Developer Last Online: Jan 2018
our battles are set to public and i'm sure logging into battles is determined by user id, so is there any reason for the password field when creating a battle? i was thinking of just making it a hidden input type. but if people were to view the source of the page and retrieve for example value="nopassword" would they be able to login? if i was to remove it completely from the form would it process correctly?
and in the browse battles page i'm trying to get the user ids. what i'm trying to do is make the user's names in the battles in progress a link so when you click it it opens rpg.php?userid= in a pop up window showing their stats. Show Your Support
|
Comments |
#2
|
||||
|
||||
The password function, at the best of my imagination at the time of writing this, used for added security. URL/form spoofs are always a risk, so there's no reason why it can't be in there.
I believe removing it would mean heavy altering of the battle files (possibly all 3 of them), and template changes. You are welcome to attempt this yourself, but be warned; I cannot provide support for errors caused of modifications to the code for obvious reasons. Always make backups I believe you can use $owner[userid] and $opponent[userid] to generate links out of their respective names (which is which is easy to spot in the template). I have to wonder, why would you want to generate such links, when all stats displayed in the rpg.php (apart from Battle Statistics) are displayed in the battle template itself? If there's a valid reason for this, I would consider adding it to the next version, see |
#3
|
|||
|
|||
the password deal i'll play around with it a bit. i just want one less thing to fill out.
this is the rpg_battle_browsemiddle template. those were the ones i used in the template but they don't output anything. if you could picture what's happening in this html, it's trying to make the names clickable so you could compare the challengers and opponents stats with a click. HTML Code:
<tr><td align="center"><b>$row[battlenumber]</b> </td> <td width="20%" align="center"><a href="http://www.treethugs.com/forum/rpg.php?userid=$owner[userid]" onclick="window.open('http://www.treethugs.com/forum/rpg.php?userid=$owner[userid]','popup','width=300,height=290,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=50,top=50'); return false">$row[owner]</a> </td> <td width="20%" align="center"><a href="http://www.treethugs.com/forum/rpg.php?userid=$opponent[userid]" onclick="window.open('http://www.treethugs.com/forum/rpg.php?userid=$opponent[userid]','popup','width=300,height=290,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=50,top=50'); return false">$row[opponent]</a> </td> <td width="20%" align="center">$gamestate </td> <td width="20%" align="center">$$row[wager] </td> <td width="20%" align="center">$turn </td> <td width="20" align="center"><a href="battlefight.php?do=enterbattle&battlenumber=$row[battlenumber]">view</a></td> </tr> you'll also see a few other things i'm trying to add to the battle browse page. like brining the top 10 players on there, settled bookie events, etc. i just can't figure out how to make them show... the link to see what it is i'm trying to do: site: http://www.treethugs.com/forum/battle.php?do=browse user: vBorg pass: test |
#4
|
||||
|
||||
It doesn't work because I assumed you meant inside the battle, not on the browse page.
When I get home (~4h) I'll see about giving you the code to add to be able to fetch the userid of the participants As for the vBookie integration, I have never touched that hack and I don't plan to, so if you can get the stuff working OK you could always release it as an addon here on vBorg |
#5
|
|||
|
|||
O wow, I hadn't even thought of integrating with Vbookie, awesome idea Chief!
I hope you'll release it if you get it |
#6
|
||||
|
||||
use $row[ownerid] and $row[opponentid] to have the JScript work
|
#7
|
|||
|
|||
Quote:
i have removed the password field from the form, and as well as from the auto PMs sent. i setup a battle me vs vBorg. then created another test account to see if i could log in as a differnt user with the correct battle # and password, and it didn't work. i also tried the url with the battle # and password, and that didn't login either. so it should be fine since i removed the login and password from the rpg_battle_browse template, unless there's other ways of logging in. cyricx, well integrating vbookie isn't going to be easiest thing for me to do. :nervous: i don't know php...but i do know how to cut and paste. so it's just trial and error hoping it spits something out to html. i'll release my findings but it won't be the most efficient code... :lick: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|