Results 1 to 11 of 11

Thread: Problem with Custom PHP File Pages

  1. #1
    Join Date
    Dec 2008
    Location
    Dirty South
    Posts
    9

    Default Problem with Custom PHP File Pages

    I have a Trade Manager feature on my site written in php code that in vb 3.8 relied on vbadvanced custom pages to function. When I upgraded to vb 4.0 and the new beta vbadvanced, everything went smooth on the install and most everything seems to be functioning properly, however when I navigate to the custom pages for this particular feature, from the site navigation module, the content from the custom pages does not show up. This what I see rather than the page content


    The url remains the same for the page as was in 3.8

    http://www.mysite/index.php?pageid=trademanager

    Am I missing something here or is the php code going to have to be re-written for my feature.

    BTW, Thanks for the new version for 4.0!

  2. #2
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default

    Was "Trade Manager" also updated for vB4? Just about any hack/add-on for vB 3.x will need to be updated for vB 4.x since how the templates & variables are handled is completely different.

  3. #3
    Join Date
    Dec 2008
    Location
    Dirty South
    Posts
    9

    Default

    Quote Originally Posted by KW802 View Post
    Was "Trade Manager" also updated for vB4? Just about any hack/add-on for vB 3.x will need to be updated for vB 4.x since how the templates & variables are handled is completely different.
    This wasn't a hack/add-on but rather just a series of php files, loaded into my file manager on my server, each one added as a page in vbadvanced. There are no templates. There were no edits made to the php code before or after the upgrade.

  4. #4
    Join Date
    Dec 2008
    Location
    Dirty South
    Posts
    9

    Default

    So I'm guessing that I'll have to rewrite the code with new variables?

  5. #5
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Can you post the PHP code from one of the files you're trying to use here?
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

  6. #6
    Join Date
    Dec 2008
    Location
    Dirty South
    Posts
    9

    Default

    Quote Originally Posted by Brian View Post
    Can you post the PHP code from one of the files you're trying to use here?
    Brian,
    Here is a big chunk of the code from the parent page of the Trade Manager. How this works on my site is; A table is created in the database manually. I create a Parent page in the add pages section of vbadvanced cmps using this file. All of the other php files used in the Trade Manager are made into pages using this as the Parent. They all work together to create my Trade Manager feature. I'm sure that this can be turned into a regular Mod with the right edits and xml file, but I'm not really a coder and alot of times try to feel my way through things with alot of trial and error or follow instructions from a more experienced person than myself.
    Thanks for your time and the great work on the 4.0 beta vbadvanced.

    <center><span style="text-decoration:underline;color:white;"><a href='index.php?pageid=trademanager'><img border="0" src="http://mysite.com/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://mysite.com/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://mysite.com/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://mysite.com/trademanager/images/complete.png">Trades Awaiting Completion</a></span> | <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=archive'><img border="0" src="http://mysite.com/trademanager/images/archive.png">Archive</a>
    </span></center>

    <br />






    <?
    if($_POST['submit']=='Archive')
    {
    $userid =$vbulletin->userinfo['userid'];
    if($userid == $_POST[creator])
    {
    echo "Trade Archived";
    echo "<br />";
    echo "<br />";
    $db->query("UPDATE trademanager set creator_archive='1' where id='$_POST[trade]'");
    }
    else
    {
    echo "Trade Archived";
    echo "<br />";
    echo "<br />";
    $db->query("UPDATE trademanager set trader_archive='1' where id='$_POST[trade]'");
    }
    }
    ?>




    <table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center">
    <tr class="tcat">
    <td colspan="5">
    Trades Awaiting Confirmation
    </td>
    </tr>
    <tr class="thead">
    <td>
    Trade ID
    </td>
    <td>
    Trade Partner
    </td>
    <td>
    Date Posted
    </td>
    <td>
    I am getting
    </td>
    <td>
    They're getting
    </td>
    </tr>

    <?
    $userid =$vbulletin->userinfo['userid'];
    $trades = $vbulletin->db->query("SELECT trademanager.*, user1.userid as userid1, user2.userid as userid2, user1.username as username1, user2.username as username2 from trademanager, user as user1, user as user2 WHERE (creator = '".$userid."' OR trader ='".$userid."') and status='unconfirmed' and user1.userid = trademanager.creator and user2.userid = trademanager.trader");
    while ($trades1 = $vbulletin->db->fetch_array($trades))
    {
    ?>
    <tr class="alt2">
    <td>
    <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=tradeinfo&tradeid=<?=$trades1[id]?>'><?=$trades1['id']?></a></span>
    </td>
    <td>
    <span style="text-decoration:underline;color:white;"><?
    if($vbulletin->userinfo['username']!=$trades1['username1'])
    {
    echo "<a href='http://www.mysite.com/member.php?u=".$trades1[userid1]."'/>";
    echo $trades1['username1'];
    echo "</a>";
    }
    else
    {
    echo "<a href='http://www.mysite.com/member.php?u=".$trades1[userid2]."'/>";
    echo $trades1['username2'];
    echo "</a>";
    }
    ?></span>
    </td>
    <td>
    <?=date('n-j-Y', strtotime($trades1[date]))?>
    </td>
    <?
    $userid =$vbulletin->userinfo['userid'];

    if($userid == $trades1['creator'])
    {
    ?>
    <td>
    <?=$trades1['trader_send']?>
    </td>
    <?
    }
    else
    {
    ?>
    <td>
    <?=$trades1['creator_send']?>
    </td>
    <?
    }
    if($userid == $trades1['trader'])
    {
    ?>
    <td>
    <?=$trades1['trader_send']?>
    </td>
    <?
    }
    else
    {
    ?>
    <td>
    <?=$trades1['creator_send']?>
    </td>
    <?
    }
    ?>

    </tr>
    <?
    }
    ?>
    </table>
    <br />
    <table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center">
    <tr class="tcat">
    <td colspan="5">
    Trades Awaiting Completion
    </td>
    </tr>
    <tr class="thead">
    <td>
    Trade ID
    </td>
    <td>
    Trade Partner
    </td>
    <td>
    Date Posted
    </td>
    <td>
    I am getting
    </td>
    <td>
    They're getting
    </td>
    </tr>

    <?
    $userid =$vbulletin->userinfo['userid'];
    $trades = $vbulletin->db->query("SELECT trademanager.*, user1.userid as userid1, user2.userid as userid2, user1.username as username1, user2.username as username2 from trademanager, user as user1, user as user2 WHERE (creator = '".$userid."' OR trader ='".$userid."') and status='confirmed' and user1.userid = trademanager.creator and user2.userid = trademanager.trader");
    while ($trades1 = $vbulletin->db->fetch_array($trades))
    {
    ?>
    <tr class="alt2">
    <td>
    <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=tradeinfo&tradeid=<?=$trades1[id]?>'><?=$trades1['id']?></a></span>
    </td>
    <td>
    <span style="text-decoration:underline;color:white;"><?
    if($vbulletin->userinfo['username']!=$trades1['username1'])
    {
    echo "<a href='http://www.mysite.com/member.php?u=".$trades1[userid1]."'/>";
    echo $trades1['username1'];
    echo "</a>";
    }
    else
    {
    echo "<a href='http://www.mysite.com/member.php?u=".$trades1[userid2]."'/>";
    echo $trades1['username2'];
    echo "</a>";
    }
    ?></span>
    </td>
    <td>
    <?=date('n-j-Y', strtotime($trades1[date]))?>
    </td>

    <?
    $userid =$vbulletin->userinfo['userid'];

    if($userid == $trades1['creator'])
    {
    ?>
    <td>
    <?=$trades1['trader_send']?>
    </td>
    <?
    }
    else
    {
    ?>
    <td>
    <?=$trades1['creator_send']?>
    </td>
    <?
    }
    if($userid == $trades1['trader'])
    {
    ?>
    <td>
    <?=$trades1['trader_send']?>
    </td>
    <?
    }
    else
    {
    ?>
    <td>
    <?=$trades1['creator_send']?>
    </td>
    <?
    }
    ?>

    </tr>
    <?
    }
    ?>
    </table>
    <br />
    <table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center">
    <tr class="tcat">
    <td colspan="7">
    Completed Trades
    </td>
    </tr>
    <tr class="thead">
    <td>
    Trade ID
    </td>
    <td>
    Trade Partner
    </td>
    <td>
    Date Posted
    </td>
    <td>
    I am getting
    </td>
    <td>
    They're getting
    </td>
    <td>
    Feedback
    </td>
    <td>
    Archive
    </td>
    </tr>
    <?
    $userid =$vbulletin->userinfo['userid'];

    $trades = $vbulletin->db->query("SELECT trademanager.*, user1.userid as userid1, user2.userid as userid2, user1.username as username1, user2.username as username2 from trademanager, user as user1, user as user2 WHERE (creator = '".$userid."' and creator_archive = '0' OR trader ='".$userid."' and trader_archive = '0') and status='completed' and user1.userid = trademanager.creator and user2.userid = trademanager.trader");

    while ($trades1 = $vbulletin->db->fetch_array($trades))
    {
    $userid =$vbulletin->userinfo['userid'];
    if($userid == $trades1[creator])
    {
    $tradepartner = $trades1[trader];
    }
    else
    {
    $tradepartner = $trades1[creator];
    }
    $feedback = "http://mysite.com/itrader_feedback.php?u=" . $tradepartner . "&dealurl=http://www.mysite.com/index.php?pageid=tradeinfo&tradeid=" . $trades1[id] . "";
    ?>
    <tr class="alt2">
    <td>
    <span style="text-decoration:underline;color:white;"><a href='index.php?pageid=tradeinfo&tradeid=<?=$trades1[id]?>'><?=$trades1['id']?></a></span>
    </td>
    <td>
    <span style="text-decoration:underline;color:white;"><?
    if($vbulletin->userinfo['username']!=$trades1['username1'])
    {
    echo "<a href='http://mysite.com/member.php?u=".$trades1[userid1]."'/>";
    echo $trades1['username1'];
    echo "</a>";
    }
    else
    {
    echo "<a href='http://www.mysite.com/member.php?u=".$trades1[userid2]."'/>";
    echo $trades1['username2'];
    echo "</a>";
    }
    ?></span>
    </td>
    <td>
    <?=date('n-j-Y', strtotime($trades1[date]))?>
    </td>
    Last edited by tradersarena; 01-16-2010 at 11:09 PM.

  7. #7
    Join Date
    Aug 2005
    Posts
    8

    Default

    php pages don't work at all, the same thing happens to me. i have two modules on the left side of my php pages and they are included and displayed fine, i even have modules that are coded in php and those work. the custom content does not show at all on any php page. even if i write "hello" and stick it in a .php file and try to make a page from it, nothing shows up except the modules.

  8. #8
    Join Date
    Dec 2008
    Location
    Dirty South
    Posts
    9

    Default

    This is what it's supposed to look like ....ss taken from vb3.8 using vbadvanced 3.2.0


  9. #9
    Join Date
    Aug 2005
    Posts
    8

    Default

    I found a workaround for the time being. Make a module with your .php file, and be sure to include the "<div class="blockrow"> </div>" tags in the file, then edit the page and display the module at the same location the "Custom Content" module is.

    hopefully this can be fixed soon though

  10. #10
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    It looks like there were a couple of small issues with PHP file pages. I've updated the includes/vba_cmps_include_bottom.php and admincp/vba_cmps_admin.php files in the Beta 1 download package here to include the fix, so if you'll download the files again and update those two on your server then that should take care of the issue. Note that you may need to edit the page again after uploading the files to enable the 'Use Module Wrapper Template' settings if that was previously enabled.
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

  11. #11
    Join Date
    Dec 2008
    Location
    Dirty South
    Posts
    9

    Default

    Brian,
    Works great now for me. Thanks for your effort and this important tool

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. vBa doesn't see my CSS file on integrated pages
    By 1996 328ti in forum Troubleshooting & Problems
    Replies: 3
    Last Post: 01-16-2010, 09:12 PM
  2. <form> tag for PHP file pages?
    By XTZGZoReX in forum Troubleshooting & Problems
    Replies: 0
    Last Post: 11-16-2008, 11:46 AM
  3. PHP File Pages: PHP File Path not valid - A Simple Solution maybe
    By blkatt in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 09-14-2007, 08:09 PM
  4. Formatting html output problem with custom pages
    By Masiello in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 12-23-2005, 02:20 PM
  5. Problem specifying custom polls on custom pages
    By surfdude in forum Troubleshooting & Problems
    Replies: 5
    Last Post: 12-05-2005, 07:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •