Jump to content

D12Eminem989

Members
  • Posts

    17
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

D12Eminem989's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It's supposed look like this: http://i27.tinypic.com/rviofm.jpg
  2. The problem is the whole right side isnt aligning. Look here: http://dev.bbhosting.org/
  3. Hello, I have a problem with my header not aligning correctly, I have 2 images in the header for the right and left side and a middle background that repeats with a header logo and ads on the right of the logo. Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <title>Untitled Document</title> <link rel="stylesheet" href="style.css" type="text/css" /> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> </head> <body> <div class="hdr"> <div id="body"> <div id="hdrbl"></div> <div id="hdrbm"> <div id="hlogo">My logo here</div> <div id="hads">Google ads here</div> </div> <div id="hdrbr"></div> </div> </div> </body> </html> Here is my CSS: body { background: #012853; color: #C1C1C1; font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; margin: 10px 10px 10px 10px; padding: 0px; } .hdr #body { /* Overall body for the header */ padding: 0; height: 104px; } .hdr #hdrbl { /* Header left image */ background-image: url(images/style/img_01.gif); width: 82px; height: 104px; float: left; } .hdr #hdrbm { /* Header middle background */ background-image:url(images/style/img_03.gif); background-repeat: repeat; height: 104px; width: auto; float: none; } .hdr #hdrbr { /* Header right image */ background-image:url(images/style/img_02.gif); width: 86px; height: 104px; float: right; } .hdr #hlogo { /* Header logo */ padding: 0; height: 104px; } .hdr #hads { /* Header right ads */ float: right; padding-right: inherit; }
  4. I fixed it thanks to our god ToonMariner. Thanks bud!
  5. Hello, I have an issue with a script. Me being a new at php however I know a few things. I tried everything I know and cannot seem to find the answer. I want this code to allow me to pull information from multipal forum ids but it alone only allows 1. I have about 6 I need it to pull from. Here is the code alone as is. This is the code I use on my page to define the threads. <?php output_News("10,97"); ?> function output_News($a = 5,$f = ""){ global $db, $Data, $vbulletin; // Define amount to show $Amount = ($a)? intval($a) : 5; // Define Forum To Pull From $Forum = ($f)? intval($f): ''; if(!$Forum){ RunError("No specified forum to pull news from."); } // Load Template $Template = LoadTemplate("news.html"); // Collect Data $NewestNews = $db->query(" select t.*,p.pagetext from ".TABLE_PREFIX."thread t left join ".TABLE_PREFIX."post p on(p.postid=t.firstpostid) where t.forumid = $Forum order by dateline desc limit 0,$Amount"); $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); while($News = $db->fetch_array($NewestNews)){ $Data .= ParseTemplate($Template, array( 'threadid' => $News['threadid'], 'threadname' => $News['title'], 'postuserid' => $News['postuserid'], 'postusername' => $News['postusername'], 'post' => $bbcode_parser->parse(unhtmlspecialchars($News['pagetext']), $f), 'comments' => vb_number_format($News['replycount']), ) ); } doOutput(); } Now I have another code that pulls the recent threads and that allows for multipal ids to be defined. Here is the code for that: function output_NewestThreads($a = 5,$f = ""){ global $db, $Data; // Define amount to show $Amount = ($a)? intval($a) : 5; // Define Forum(s) To Pull From $Forums = ($f)? $f: ''; $SQL = ''; if($Forums){ $SQL = " where forumid in({$Forums})"; } // Load Template $Template = LoadTemplate("newest_threads.html"); // Collect Data $NewestThreads = $db->query("select * from ".TABLE_PREFIX."thread{$SQL} order by dateline desc limit 0,$Amount"); while($Thread = $db->fetch_array($NewestThreads)){ $Data .= ParseTemplate($Template, array( 'threadid' => $Thread['threadid'], 'threadname' => $Thread['title'], 'postuserid' => $Thread['postuserid'], 'postusername' => $Thread['postusername'], 'replies' => vb_number_format($Thread['replycount']), 'views' => vb_number_format($Thread['views']), 'lastposter' => $Thread['lastposter'], ) ); } doOutput(); } The php markup for the above to desplay the threads is: <?php output_Threads(10,"2,17,22,35,96,20,23,18,97"); ?> See I want to be able to add as many forum ids as I define like the above but I got no where. Here is the full script: <?php // --------------------------------------------------- // Start Set PHP Environment // --------------------------------------------------- error_reporting(E_ALL & ~E_NOTICE); // --------------------------------------------------- // End Set PHP Environment // --------------------------------------------------- // --------------------------------------------------- // Start Define Important Constants // --------------------------------------------------- define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'vBExternal'); // --------------------------------------------------- // End Define Important Constants // --------------------------------------------------- // --------------------------------------------------- // Start Cache Of Any Needed Templates/Phrase's // --------------------------------------------------- $phrasegroups = array(); $specialtemplates = array( 'options', ); $actiontemplates = array(); $globaltemplates = array(); // --------------------------------------------------- // End Cache Of Any Needed Templates/Phrase's // --------------------------------------------------- // --------------------------------------------------- // Start Call DB & Establish Connection // --------------------------------------------------- if( !file_exists('./includes/config.php')) { echo "includes/config.php does not exist. Cannot continue."; exit; } require_once('./includes/class_core.php'); require('./includes/config.php'); DEFINE('DIR','.'); DEFINE('TABLE_PREFIX',$config['Database']['tableprefix']); $vbulletin =& new vB_Registry(); // Fake an OOP Object switch (strtolower($config['Database']['dbtype'])) { // load standard MySQL class case 'mysql': case '': { $db =& new vB_Database($vbulletin); break; } // load MySQLi class case 'mysqli': { $db =& new vB_Database_MySQLi($vbulletin); break; } // load extended, non MySQL class default: { die('Fatal error: Database class not found'); } } require_once('./includes/functions.php'); // make database connection $db->connect( $config['Database']['dbname'], $config['MasterServer']['servername'], $config['MasterServer']['port'], $config['MasterServer']['username'], $config['MasterServer']['password'], $config['MasterServer']['usepconnect'], $config['SlaveServer']['servername'], $config['SlaveServer']['port'], $config['SlaveServer']['username'], $config['SlaveServer']['password'], $config['SlaveServer']['usepconnect'], $config['Mysqli']['ini_file'] ); $vbulletin->db =& $db; // --------------------------------------------------- // End Call DB & Establish Connection // --------------------------------------------------- // --------------------------------------------------- // Start Require Globalized Settings // --------------------------------------------------- class vBulletinHook { function fetch_hook() { return false; } } define('TIMENOW', time()); require_once('./includes/class_bbcode.php'); $Data = ""; // Page Output Variable $datastore_class = (!empty($config['Misc']['datastore'])) ? $config['Misc']['datastore'] : 'vB_Datastore'; if ($datastore_class != 'vB_Datastore') { require_once('./includes/class_datastore.php'); } $vbulletin->datastore =& new $datastore_class($vbulletin, $db); $vbulletin->datastore->fetch($specialtemplates); // --------------------------------------------------- // End Require Globalized Settings // --------------------------------------------------- // --------------------------------------------------- // Start Globalized Function - LoadTemplate // --------------------------------------------------- function LoadTemplate($template = ""){ $template = "vBExternal/{$template}"; if(!file_exists($template)){ RunError("System was unable to find the template '{$template}'"); } if(!$Handler = fopen($template,'r')){ RunError("System was unable to open the template '{$template}'"); } $template = fread($Handler,filesize($template)); fclose($Handler); return $template; } // --------------------------------------------------- // End Globalized Function - LoadTemplate // --------------------------------------------------- // --------------------------------------------------- // Start Globalized Function - RunError // --------------------------------------------------- function RunError($message = ""){ echo "<font size='1' face='verdana'>There was an error while processing vBExternal:<br />{$message}</font>"; exit; } // --------------------------------------------------- // End Globalized Function - RunError // --------------------------------------------------- // --------------------------------------------------- // Start Globalized Function - ParseTemplate // --------------------------------------------------- function ParseTemplate($template, $parser = array(), $doGlobals = 0){ global $vbulletin; if(is_array($parser)){ foreach($parser as $find => $replace){ $template = str_replace("{".$find."}", $replace, $template); } } else if($doGlobals){ $RepGlobals = array( 'url' => $vbulletin->options['bburl'], ); foreach($RepGlobals as $find => $replace){ $template = str_replace("{".$find."}", $replace, $template); } } return $template; } // --------------------------------------------------- // End Globalized Function - ParseTemplate // --------------------------------------------------- // --------------------------------------------------- // FUNCTION: output_NewestMembers // DETAIL: Outputs newest X members in order of // newest registered first. $a // specifies amount to show (Default 5) // --------------------------------------------------- function output_NewestMembers($a = 5){ global $db, $Data; // Define amount to show $Amount = ($a)? intval($a) : 5; // Load Template $Template = LoadTemplate("newest_members.html"); // Collect Data $NewestMem = $db->query("select username,posts,userid from ".TABLE_PREFIX."user order by joindate desc limit 0,$Amount"); while($Member = $db->fetch_array($NewestMem)){ $Data .= ParseTemplate($Template, array( 'username' => $Member['username'], 'posts' => vb_number_format($Member['posts']), 'userid' => $Member['userid'], ) ); } doOutput(); } // --------------------------------------------------- // FUNCTION: output_TopPosters // DETAIL: Outputs Top X posts in order of // highest post count descending. $a // specifies amount to show (Default 5) // --------------------------------------------------- function output_TopPosters($a = 5){ global $db, $Data; // Define amount to show $Amount = ($a)? intval($a) : 5; // Load Template $Template = LoadTemplate("newest_members.html"); // Collect Data $TopPosters = $db->query("select username,posts,userid from ".TABLE_PREFIX."user order by posts desc limit 0,$Amount"); while($Member = $db->fetch_array($TopPosters)){ $Data .= ParseTemplate($Template, array( 'username' => $Member['username'], 'posts' => vb_number_format($Member['posts']), 'userid' => $Member['userid'], ) ); } doOutput(); } // --------------------------------------------------- // FUNCTION: output_NewestThreads // DETAIL: Outputs X newest threads ordered by // start date descending. $a // specifies amount to show (Default 5) // and $f can specify certain forums // to grab from (1,3,4), by default it pulls // from all forums. // --------------------------------------------------- function output_NewestThreads($a = 5,$f = ""){ global $db, $Data; // Define amount to show $Amount = ($a)? intval($a) : 5; // Define Forum(s) To Pull From $Forums = ($f)? $f: ''; $SQL = ''; if($Forums){ $SQL = " where forumid in({$Forums})"; } // Load Template $Template = LoadTemplate("newest_threads.html"); // Collect Data $NewestThreads = $db->query("select * from ".TABLE_PREFIX."thread{$SQL} order by dateline desc limit 0,$Amount"); while($Thread = $db->fetch_array($NewestThreads)){ $Data .= ParseTemplate($Template, array( 'threadid' => $Thread['threadid'], 'threadname' => $Thread['title'], 'postuserid' => $Thread['postuserid'], 'postusername' => $Thread['postusername'], 'replies' => vb_number_format($Thread['replycount']), 'views' => vb_number_format($Thread['views']), 'lastposter' => $Thread['lastposter'], ) ); } doOutput(); } // --------------------------------------------------- // FUNCTION: output_NewestReplies // DETAIL: Outputs X newest threads ordered by // last post descending. $a // specifies amount to show (Default 5) // and $f can specify certain forums // to grab from (1,3,4), by default it pulls // from all forums. // --------------------------------------------------- function output_NewestReplies($a = 5,$f = ""){ global $db, $Data; // Define amount to show $Amount = ($a)? intval($a) : 5; // Define Forum(s) To Pull From $Forums = ($f)? $f: ''; $SQL = ''; if($Forums){ $SQL = " where forumid in({$Forums})"; } // Load Template $Template = LoadTemplate("newest_threads.html"); // Collect Data $NewestReplies = $db->query("select * from ".TABLE_PREFIX."thread{$SQL} order by lastpost desc limit 0,$Amount"); while($Thread = $db->fetch_array($NewestReplies)){ $Data .= ParseTemplate($Template, array( 'threadid' => $Thread['threadid'], 'threadname' => $Thread['title'], 'postuserid' => $Thread['postuserid'], 'postusername' => $Thread['postusername'], 'replies' => vb_number_format($Thread['replycount']), 'views' => vb_number_format($Thread['views']), 'lastposter' => $Thread['lastposter'], ) ); } doOutput(); } // --------------------------------------------------- // FUNCTION: output_News // DETAIL: Outputs the first post from X threads // from a specific forum (ordered by newest // first) // --------------------------------------------------- function output_News($a = 5,$f = ""){ global $db, $Data, $vbulletin; // Define amount to show $Amount = ($a)? intval($a) : 5; // Define Forum To Pull From $Forum = ($f)? intval($f): ''; if(!$Forum){ RunError("No specified forum to pull news from."); } // Load Template $Template = LoadTemplate("news.html"); // Collect Data $NewestNews = $db->query(" select t.*,p.pagetext from ".TABLE_PREFIX."thread t left join ".TABLE_PREFIX."post p on(p.postid=t.firstpostid) where t.forumid = $Forum order by dateline desc limit 0,$Amount"); $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); while($News = $db->fetch_array($NewestNews)){ $Data .= ParseTemplate($Template, array( 'threadid' => $News['threadid'], 'threadname' => $News['title'], 'postuserid' => $News['postuserid'], 'postusername' => $News['postusername'], 'post' => $bbcode_parser->parse(unhtmlspecialchars($News['pagetext']), $f), 'comments' => vb_number_format($News['replycount']), ) ); } doOutput(); } // --------------------------------------------------- // FUNCTION: output_UsersOnline // DETAIL: Outputs All Users Online In The Forum // --------------------------------------------------- function output_UsersOnline(){ global $db, $Data, $vbulletin; // Load Template $Template = LoadTemplate("users_online.html"); $cache = array(); // Collect Data $datecut = TIMENOW - $vbulletin->options['cookietimeout']; $UsersOnline = $db->query(" SELECT user.username, (user.options) AS invisible, user.usergroupid, session.userid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "session AS session LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid) WHERE session.lastactivity > $datecut and user.userid > 0 " . iif($vbulletin->options['displayloggedin'] == 1, "ORDER BY username ASC") . " "); while($User = $db->fetch_array($UsersOnline)){ if(!$cache[$User['userid']]){ $cache[$User['userid']] = $User['userid']; $Data .= ParseTemplate($Template, array( 'userid' => $User['userid'], 'username' => $User['username'], ) ); } } unset($cache); doOutput(); } function doOutput(){ global $Data, $vbulletin; echo ParseTemplate($Data,"",1); $Data = ""; } ?>
  6. Well good news, I fixed the repeat, I forgot to add repeat in there. I just have a small problem with the blocks. They are off a tad in IE.
  7. Well, I have a few little minor problems. Here is what the view I get in ie: This is what I want and this is what I see in Firefox: Would anyone know how to fix this? Here is my CSS: body { background: #c0c0c0; color: #ffffff; font: 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; } a:link, a:active, a:visited, a.postlink { color: #6c6c6c; text-decoration: none; } a:hover { color: #000000; } .bg { background: #2e2d22; } .footer { background: #2b2b2b url('images/style/syl_11.gif'); padding: 0 50px 3px; } .validate { padding: 0 50px 3px; } .button { font: 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; color: #ffffff; background: #53641e; border: 1px solid #000000; padding-bottom: 2px; padding-left: 2px; } img { border: 0 solid; } .tdc1 { background: #2e2d22 url('images/style/syl_05.gif'); } .tdc2 { background: #2e2d22 url('images/style/syl_06.gif'); } .tdc3 { background: #2e2d22 url('images/style/syl_02.gif'); } .tdc4 { background: #2e2d22 url('images/style/syl_03.gif'); } .b1_t { background: #2e2d22 url('images/style/b1_top.gif'); padding: 1px 12px; height: 19px; width: 167px; } .b1_m { background: #2e2d22 url('images/style/b1_middle.gif'); padding: 1px 8px; height: 1px; } .b1_b { background: #2e2d22 url('images/style/b1_bottom.gif'); height: 9px; } .b2_t { background: #2e2d22 url('images/style/b2_top.gif'); padding: 1px 12px; height: 19px; } .b2_m { background: #2e2d22 url('images/style/b2_middle.gif'); padding: 1px 8px; height: 1px; } .b2_b { background: #2e2d22 url('images/style/b2_bottom.gif'); height: 9px; }
  8. It works fine in Firefox. Just how I want. But IE sucks and screws everything up.. Here's my code: /* General */ body { background: #C0C0C0; color: #FFFFFF; font: 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; } a:link, a:active, a:visited, a.postlink { color: #AAAAAA; text-decoration: none; } a:hover { color: #FFFFFF; } .bg { background: #40382b; } .announcement { background: #40382b url(images/template/32dnsckj.jpg); padding: 5px 115px; } hr { border: none 0; border-top: 1px dashed #000000; height: 1px; } .tf { font: 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; color: #FFFFFF; background: #40382b; border: 1px solid #000000; padding-bottom: 2px; padding-left: 2px; } img { border:0 solid; } /* Poll */ .poll_bar { border: 1px solid #000000; height: 9px; width: 75%; } .poll_bar_fill { background-color: #000000; height: 9px; } /* Menu(s) */ .menua-1 { background: #40382b url(images/template/w8o1hh5l.jpg); padding: 5px 5px; } .menua-2 { background: #40382b url(images/template/mp9dfcv7.jpg); height: 7px; } .menub-1 { background: #40382b url(images/template/b4q8qafm.jpg); padding: 5px 5px; } .menub-2 { background: #40382b url(images/template/cy8a7p5z.jpg); height: 7px; } .menuc-1 { background: #40382b url(images/template/eb43nm8m.jpg); padding: 5px 5px; } .menuc-2 { background: #40382b url(images/template/qe57c79w.jpg); height: 7px; }
  9. Take a look at the IE picture, My announcements bar is way streatched out. The navigation images above are alittle break line under it. In Firefox there isn't.
  10. I have an issue with my css. The css scripting I coded works great in Firefox however in IE it sucks. Take a look here: Here is the view in Firefox: http://i26.tinypic.com/2e16djr.jpg Here is the view in IE: http://i26.tinypic.com/20hqdub.jpg Is there anyway to fix that issue in IE?
  11. Thanks, Maybe in the future I will try it out when I get the hang of it. I will refer back to this thread for some pointers. Thank you for your time.
  12. nvm i ditched the css issue. To much of a hassle. Did it my old way I do things. Thx for help thoe.
  13. Hey bronzemonkey I am cool with that. It wont let me reply to your message. You got time to help me with these few problems?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.