Got Problems in manual updating the mainpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • citrix
    Member
    • Oct 2006
    • 99
    • 3.8.x

    Got Problems in manual updating the mainpage

    Currently I´m developing an external script for a guy who also owns a VBulletin Board.
    This script makes it possible to create Threads in a specific Forum without Using the "New Thread" Function in the board itself.
    There is a form on an external Page , where the User can fill in Data. On Submit the data will be stored in the DB.
    After activation of the submitted Data in a special Admin-Panel, the Data should be posted to a special definied Forum.
    So if the User selected SVCD , the Contents will be posted there.
    Until now it works perfect, but i have a problem to update the mainpage, which means : Last Post Time (in the specific forum),Thread Count and Reply Count ...)
    You cant see if something new was posted in e.g. the SVCD Forum, and thats my problem...
    Maybe you could take a look at the code below and correct it in that way, that it works or you tell me whats wrong with it



    PHP Code:

    ## Get needed Data from DB (Reply-Counts)

    $eintrag "SELECT replycount FROM vbforum WHERE title='".$rel_cat."'";

             
    $result mysql_query($eintrag)

                   or die (
    "Eintrag in die Datenbank nicht möglich zur Zeit:<br>".mysql_error());

              if (
    $result) {

                   while (
    $ar=mysql_fetch_array($result,MYSQL_ASSOC)){

                   
    $replycount=$ar["replycount"];

     
    $replycount_db=$replycount+1;

                   }

                   }

    ## Get needed Data from DB (Thread-Counts)

    $eintrag "SELECT threadcount FROM vbforum WHERE title='".$rel_cat."'";

             
    $result mysql_query($eintrag)

                   or die (
    "Eintrag in die Datenbank nicht möglich zur Zeit:<br>".mysql_error());

              if (
    $result) {

                   while (
    $ar=mysql_fetch_array($result,MYSQL_ASSOC)){

                   
    $threadcount=$ar["threadcount"];

     
    $threadcount_db=$threadcount+1;

                   }

                   }

     
    #### Changing the mainpage

     
    mysql_query("UPDATE vbforum SET lastpost='".$dateline."',replycount='".$replycount_db."',lastposter='".$lastposter."',lastpostid='".$lastpostid_db."',lastthread='".$rel_name2."',lastthreadid='".$threadid."',threadcount='".$threadcount_db."', WHERE title='".$rel_cat."'"); 
    here is the example :



    I posted something in the SVCD Category, but on the Mainpage you cant see it...


    In the UPDATE command there are some variables i initialized before the SELECTIONS...
    $rel_cat means the Section like SVCD, Serie/Doku , PC-Games etc...


    thanks for your help
    Last edited by citrix; Mon 9 Oct '06, 10:38am.
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    I recommend you ask your friend to set you up for priority forum support by following these instructions and then asking for help with this on www.vbulletin.org : http://www.vbulletin.com/forum/showthread.php?t=116494
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • citrix
      Member
      • Oct 2006
      • 99
      • 3.8.x

      #3
      okay I´ll try there ..

      ty

      Comment

      • citrix
        Member
        • Oct 2006
        • 99
        • 3.8.x

        #4
        so until now nobody has responsed to my request, so I try it here again ^^
        havent found any misstake until now

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎