Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Thanked 0 Times in 0 Posts

    New to coding and need some help please

    Hello everyone,

    This is my first post and i would like to say hi to everyone in this great community

    My name is Brett and i am just starting to learn the very basics of coding and was hoping some of you guys and gals may be able to help me along the way

    Anyway here is my first question:

    I have a site and want to move a few banner ads into different places in the site, i have had a look but before i go ahead i wanted ask you nice people how to do it,

    I want to move the banner ad that sits above the header to underneath it and then i want to move the 200x200 that sits in the index menu on the left hand side so that it sits inside the main page description, like this

    this is the code:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="<?if(strlen($descr) <= 0) {?><?=getSet("descr2")?><?} else echo $descr; ?>" name="description">
    <meta content="<?if(strlen($keys) <= 0) {?><?=getSet("keys2")?><?} else echo $keys; ?>" name="keywords">
    <link rel="stylesheet" href="<?=$tpath?>/style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?=$p?>/css/thickbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="<?=$p?>/js/base.js"></script>
    <script type="text/javascript" src="<?=$p?>/js/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="<?=$p?>/js/thickbox-compressed.js"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <body onload="initialize()" onunload="GUnload()">
    <div align="center">
    <!-- Top Banner Start -->
    <? if(getSet("TopBannerCode")!="") {?><?=getSet("TopBannerCode")?><? }?>
    <!-- Top Banner End -->
    <div class="site_container">
      <div id="search_box">
        <?if(!isAuth()) {?>
    		<form method="post">
    			<?=$l['Login']?> <input type="text" name="log_x" class="login" /> <?=$l['Password']?> <input type="password" name="pass_x" class="login" />&nbsp;<input type="submit" value="<?=$l['Login']?>" name="auth_x" class="toplogbut" />
    	<?} else {?>
    	   <?=$l['hello']?> <?=htmlspecialchars($_SESSION['login'])?>&nbsp;&nbsp;&nbsp;<a class="mc" href="<?=$p?>/myAds"><?=$l['myAds']?></a>&nbsp;&nbsp;&nbsp;<a class="mc" href="<?=$p?>/Profile"><?=$l['Profile']?></a>&nbsp;&nbsp;&nbsp;<a class="mc" href="<?=$p?>/logout"><?=$l['Logout']?></a><?if(isAdmin()) {?>&nbsp;&nbsp;&nbsp;<a class="mc" href="<?=$p?>/admin/index.php"><?=$l['Administration']?></a><?}?>
    <?php $headerImage = getSet('headerImage'); ?>
    <div class="header" <?=($headerImage!='' ? 'style="background-image: url('.$p.'/'.$headerImage.');"' : '')?>>
        <div class="header_title"> <br />
    	 <h1><?=(getSet('projectNameDisplay')==1 ? getSet('projectName') : '')?></h1>
        <div class="header_search_box"> <br />
          <form method="post" action="<?=$p?>/Classified">
            <div class="search_container">
              <input name="searchText" type="text" class="search" value="<?=$l['SearchField']?>" onblur="if(this.value=='') this.value='Search...';" onfocus="if(this.value=='Search...') this.value='';" />
            <div class="search_container_button">
              <input type="image" src="<?=$tpath?>/images/search.gif" name="search" />
    		<div class="advanced_link"><a href="<?=$p?>/aSearch" class="wh"><?=$l['advancedSearchLink']?></a></div>
    	<div  class="seperator"></div>
    	$menu = mysql_query("SELECT * FROM cms_pages where menushow='1' and url!='myAds' order by weight asc") or die(mysql_error());
    	$num_of_pages = mysql_num_rows($menu);	
    	$cls = "top_menu";
    		$cls = "top_menu1";
    	<div class="top_menu">
    	  while($menus = mysql_fetch_assoc($menu)){
    	  		if($menus['url'] == 'signup'){
    			<?if(!isAuth()) {?><div class="menu_links"><a href="<?=$p?>/<?=$menus['url']?>" class="top"><?=$menus['name2']?></a></div><?}?>
    			<?if(isAuth() && 1==2) {?><div class="menu_links"><a href="<?=$p?>/Profile" class="top"><?=$l['profile']?></a></div><?}?>
    			else if($menus['url'] == 1){
    			<div class="menu_links"><a href="<?=$p?>/index.php" class="top"><?=$menus['name2']?></a></div>
    			} else if($menus['url'] == 'Login'){
    			<?if(!isAuth()) {?><div class="menu_links"><a href="<?=$p?>/<?=$menus['url']?>/" class="top"><?=$menus['name2']?></a></div><?}?>
    			} else {
    			<div class="menu_links"><a href="<?=$p?>/<?=$menus['url']?>/" class="top"><?=$menus['name2']?></a></div>
      <div  class="seperator"></div>
      <div id="left_column">
      	<div class="left_menu_divider">
    		<?for($i = 0; $i < count($cc); $i++) {?>
    			<div class="dmenu">
    				<a class="lmenu" href="<?=$p?>/Classified/<?=clean_accents($cc[$i]['url'])?>/"><?=$cc[$i]['name' . langId()]?><span><?=$cc[$i]['count']?></span></a>
    	<div class="listing_area">
    <!-- Left Banner Top Option Start -->
    	<? if(getSet("LeftBannerCode")!="") {?>
    	<div align="center"><br /><?=getSet("LeftBannerCode")?></div>
    	<? }?>
    <!-- Left Banner Top Option End-->
    		<div class="pading">
    			<div class="new_listing"><?=$l['newListings']?></div>
    			<? for($i = 0; $i<count($ni); $i++) {?>
    				<div class="pading">
    					<div class="padding_bottom_5px">
    						<a href="<?=$p?>/Classified/<?=clean_accents($ni[$i]['catUrl'])?>/<?=clean_accents($ni[$i]['url'])?>/" class="wh"><?=$ni[$i]['name2']?></a>
    						<a href="<?=$p?>/Classified/<?=clean_accents($ni[$i]['catUrl'])?>/<?=clean_accents($ni[$i]['url'])?>/"><img src="<?=$p?>/upload/s_<?=$ni[$i]['file1']?>"></a>
    sorry for sounding like a complete plank but like i say i am a complete novice to this.

    Kind regards


  • #2
    Senior Coder
    Join Date
    Jul 2011
    Thanked 171 Times in 171 Posts
    This is an html/css problem - not a PHP problem .

    You want to edit the header CSS class (.header) - there's probably some positioning already in that class that you'll just need to alter. Use Google Chrome, and use the 'Inspect Element' developer tool
    Useful function to retrieve difference in times
    The best PHP resource
    A good PHP FAQ
    PLEASE remember to wrap your code in [PHP] tags.
    PHP Code:
    // Replace this
    // With this
    // Then check for values/forms. Some IE versions don't send the submit button 
    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.


    Posting Permissions

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