The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Trade Manager Mod Help?
I have recently had a friend install a new trade manager on my forum. Almost everything is working great. He took it from his forum and pretty much re-created it on mine. For a small fee of course.
Well here is my situation. There are two things that are not working right. When you "create" a trade you have to put it what the creator of the trade is giving, and what you are receiving as well. And other small notes as well of course. On the "info" page for each trade, the "what creator is sending" and "what you are receiving" does not show up. So I am guessing there is some kind of wrong template edit or something that is causing this. It would be great if I could send the code to some to just look at for a minute. It's really not that big at all. Or if that does not work I could give them temporary access to the forum. I would greatly appreciate it. The person who was installing it is going through some family problems and I really would like to get this TM launched. This is the last thing that needs fixed before we can launch it. Thanks for reading! Any help would be great. |
#2
|
|||
|
|||
Anyone?
|
#3
|
||||
|
||||
It is very hard to just jump into someone else's code and 'see' what is going on and then fix the issues. That is probably why you aren't getting people to help. You may want to actually post the relevant parts of the code and maybe we can see the error - the php part that grabs the variable and the template that spits it out and the part around the other template for where the custom template gets inserted.
|
#4
|
|||
|
|||
Sorry this has taken so long. I did not know that some one had finally replied. Hopefully you can help.
Here is the template that takes it. Picture Code:
<center><span style="text-decoration:underline;color:white;"><a href='index.php?pageid=trademanager'><img border="0" src="http://calistyle101.com/forums/trademanager/images/home.png">Trade Manager</a></span> | <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=tradecreator'><img border="0" src="http://calistyle101.com/forums/trademanager/images/create.png">Create Trade</a></span> | <span style="text-decoration:underline;color:white;"><a href='/index.php?pageid=confirmtrade'><img border="0" src="http://calistyle101.com/forums/trademanager/images/confirm.png">Confirm Trade</a></span> | <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=completetrade'><img border="0" src="http://calistyle101.com/forums/trademanager/images/complete.png">Complete Trade</a></span></center> <br /> <? if($_POST[submit]) { $tradewith = $_POST['tradewith']; $trades = $db->query("SELECT userid from user where username='$tradewith'"); $count=0; while ($trades1 = $vbulletin->db->fetch_array($trades)) { $tradewith = $trades1['userid']; $count++; } $userid =$vbulletin->userinfo['userid']; $date = date('Y-m-d'); if($count=='1') { $_POST[send] = addslashes($_POST[send]); $_POST[receive] = addslashes($_POST[receive]); $_POST[notes] = addslashes($_POST[notes]); $db->query("INSERT into trademanager SET lastaction='trade created', status='unconfirmed', trader=$tradewith, creator=$userid, creator_send='$_POST[send]', trader_send='$_POST[receive]', notes='$_POST[notes]', date='$date'"); echo "Your trade has been added. If you would like to view your trade please go to <a href='index.php?pageid=trademanager'>Trade Manager</a>"; unset($_POST); } else { echo "You have made a mistake. Please check to make sure that the username is properly entered."; } } if(is_numeric($_GET['user']) && $_GET['user'] != 0) { $trades = $db->query("SELECT username from user where userid = '$_GET[user]'"); while ($trades1 = $vbulletin->db->fetch_array($trades)) { $_POST[tradewith] = $trades1['username']; } } ?> <style> div.trademanager td, div.trademanager table {border:1px solid #000066; border-collapse:collapse;} div.trademanager tr.header {border:1px solid #000066; border-collapse:collapse; background-color: #c0c0c0;} div.trademanager tr.white {border:1px solid #000066; border-collapse:collapse; background-color: #f0f0f0;} </style> <form name="createtrade" action="/index.php?pageid=tradecreator" method="POST"> <div class="trademanager"> <table width="100%" border="1"> <tr> <td>Trade With:</td> <td><input size="40" type="text" name="tradewith" value='<?=$_POST[tradewith]?>'></td> </tr> <tr> <td>They are getting:</td> <td><textarea name="send" rows="5" cols="40"><?=$_POST['send']?></textarea></td> </tr> <tr> <td>I am getting:</td> <td><textarea name="receive" rows="5" cols="40"><?=$_POST['receive']?></textarea></td> </tr> <tr> <td>Additional Terms:</td> <td><textarea name="notes" rows="5" cols="40"><?=$_POST['notes']?></textarea></td> </tr> <tr> <td> </td> <td> <input name="submit" type="submit" value="Submit Trade" /> </td> </table> </div> </form> And here is the one that is suppose to spit it out. Picture Where it says creator sends, and trade partner sends are the parts that are not coming up. Any ideas? Code:
<center><span style="text-decoration:underline;color:white;"><a href='index.php?pageid=trademanager'><img border="0" src="http://calistyle101.com/forums/trademanager/images/home.png">Trade Manager</a></span> | <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=tradecreator'><img border="0" src="http://calistyle101.com/forums/trademanager/images/create.png">Create Trade</a></span> | <span style="text-decoration:underline;color:white;"><a href='/index.php?pageid=confirmtrade'><img border="0" src="http://calistyle101.com/forums/trademanager/images/confirm.png">Confirm Trade</a></span> | <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=completetrade'><img border="0" src="http://calistyle101.com/forums/trademanager/images/complete.png">Complete Trade</a></span></center> <br /> <? if($_POST['submit']) { $comments=addslashes($_POST['comments']); $vbulletin->db->query("UPDATE trademanager SET comments = '$comments' WHERE (id=$_REQUEST[tradeid])"); } $userid =$vbulletin->userinfo['userid']; $trades = $vbulletin->db->query("SELECT trademanager.*, userfield1.field12 as address1, userfield2.field12 as address2, user1.username as username1, user2.username as username2 from trademanager, user as user1, user as user2, userfield as userfield1, userfield as userfield2 WHERE (id=$_REQUEST[tradeid]) and user1.userid = trademanager.creator and user2.userid = trademanager.trader and userfield1.userid=trademanager.creator and userfield2.userid=trademanager.trader"); while ($trades1 = $vbulletin->db->fetch_array($trades)) { if($trades1[creator] == $userid) { $tradepartner = $trades1[trader]; } else { $tradepartner = $trades1[creator]; } ?> <style> div.trademanager td, div.trademanager table {border:1px solid #000066; border-collapse:collapse;} div.trademanager tr.header {border:1px solid #000066; border-collapse:collapse; background-color: #256193;} div.trademanager tr.white {border:1px solid #000066; border-collapse:collapse; background-color: #184162;} </style> <center> <div class="trademanager"> <table> <tr class="header"> <td colspan="2"> Trade Info </td> </tr> <tr> <td>Trade ID</td> <td><?=$trades1['id']?></td> </tr> <tr> <td>Trade Date</td> <td><?=date('n-d-Y', strtotime($trades1['date']))?></td> </tr> <tr> <td>Trade Creator</td> <td><?=$trades1['username1']?></td> </tr> <tr> <td>Trade Partner</td> <td><?=$trades1['username2']?></td> </tr> <tr> <td>Creator Sends</td> <td><?=$trades1['creatorsends']?></td> </tr> <tr> <td>Trade Partner Sends</td> <td><?=$trades1['tradersends']?></td> </tr> <tr> <td>Creator Confirmation</td> <td> <? if($trades1['creatorconfirm']) { echo "Yes"; } else { echo "No"; } ?> </td> </tr> <tr> <td>Trader Confirmation</td> <td> <? if($trades1['traderconfirm']) { echo "Yes"; } else { echo "No"; } ?> </td> </tr> <tr> <td>Creator Receive Date</td> <td> <? if($trades1[traderreceivedate] !='0000-00-00 00:00:00') { echo date('n-d-Y', strtotime($trades1[creatorreceivedate])); } else { echo "Not Received"; } ?> </td> </tr> <tr> <td>Trader Receive Date</td> <td> <? if($trades1[traderreceivedate] !='0000-00-00 00:00:00') { echo date('n-d-Y', strtotime($trades1[traderreceivedate])); } else { echo "Not Received"; } ?> </td> </tr> <tr> <td>Trade Status</td> <td><?=$trades1['tradestatus']?></td> </tr> <tr> <td>Notes</td> <td><?=$trades1['notes']?></td> </tr> <tr> <td>Last Action</td> <td><?=$trades1['lastaction']?></td> </tr> <tr> <td>Leave Feedback</td> <td> <? echo "<a href='http://www.calistyle101.com/forums/itrader_feedback.php?u=" . $tradepartner . "&dealurl=". urlencode('http://www.calistyle101.com/forums/index.php?pageid=tradeinfo&tradeid='). $trades1['id'] ."'>Leave Feedback</a>"; ?> </td> </tr> <tr> <td> Comments </td> <td> <? if(($vbulletin->userinfo['usergroupid']=='6') || ($vbulletin->userinfo['usergroupid']=='7') || ($vbulletin->userinfo['usergroupid']=='5') || ($vbulletin->userinfo['usergroupid']=='18')) { ?> <form name="comment" method="post" action = "index.php?pageid=tradeinfo&tradeid=<?=$trades1[id]?>"> <textarea name="comments"cols="30" rows="5"><?=stripslashes($trades1['comments'])?></textarea> <input type="submit" name="submit" value="Submit" /> </form> <? } else { stripslashes($trades1['comments']); } ?> </td> </tr> </table> </div> </center> <? } ?> |
#5
|
||||
|
||||
Wrong column names....
Code:
<td>Creator Sends</td> <td><?=$trades1['creatorsends']?></td> </tr> <tr> <td>Trade Partner Sends</td> <td><?=$trades1['tradersends']?></td> Code:
<td>Creator Sends</td> <td><?=$trades1['creator_send']?></td> </tr> <tr> <td>Trade Partner Sends</td> <td><?=$trades1['trader_send']?></td> |
#6
|
|||
|
|||
It looks as if I still get the same result. I changed that in the tradeinfo file and still get the same thing, nothing at all. I tried changing everything I could find that has to do with receive or send to those, but it still did not work.
Any other ideas? |
#7
|
||||
|
||||
I'd suggest you look in the table and verify the names of the columns. Also, look to see it is even getting input. You need to find out if it isn't being spit out because it isn't there (thus something is wrong with your first block of code) or because soemthing is wrong with the second block of code.
|
#8
|
|||
|
|||
Yes, I have went through all of that many times. I do not know much php though. I just know what I do know from editing mods and so forth. Would there be any way possible I could get some hands on help? Maybe we can work through IM and I could give you access to this? Like I said I dont have much, but I could give you some money if we could possibly get this fixed.
|
#9
|
||||
|
||||
I'm able to spot the little things that are incorrect (like inconsistencies in column names), but I am not so good at just jumping into someone else's code and being able to see what is going on. When I code and have problems, I fill it with debug info to see what is going on. I can't do that with something I don't have installed myself so I really wouldn't be any help at all with your problem. It may be your best bet is to post a request in the Requests For Paid Services forum.
|
#10
|
|||
|
|||
Yeah I thought about doing that. But from the looks of it most things over there do not get picked up or even commented on.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|