Jump to content

ghurty

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by ghurty

  1. But what gets me confused is that how come when I just have:

    	
    $GLOBALS['VendorId'] = $vendor['vendorid'];
    $GLOBALS['VendorLogo'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/". $vendor['vendorid'] ."_logo.png";

     

    It does pull up and display the logo properly.

     

    The php file and images are in two different directories.

  2. I tried

    		$GLOBALS['VendorId'] = $vendor['vendorid'];
    		$GLOBALS['VendorLogo'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/". $vendor['vendorid'] ."_logo.png";
              if(!file_exists( $GLOBALS['VendorLogo'] )){
                $GLOBALS['VendorLogo'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/"."defaultlogo.png";
          }

     

    And no matter what, it goes to the defaultlogo. However if I comment out the whole  if !file_exists part, it displays the real logo. For some reason when checking, it considers the logos not found.

     

     

    Thanks

  3. So should this code work:

    	while($vendor = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
    		$GLOBALS['VendorId'] = $vendor['vendorid'];
    		$GLOBALS['VendorLogotemp'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/". $vendor['vendorid'] ."_logo.png";
    		if(file_exists( $GLOBALS['VendorLogotemp'] )){
    			$GLOBALS['VendorLogo'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/". $vendor['vendorid'] ."_logo.png";
    			} else {
    				$GLOBALS['VendorLogo'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/"."defaultlogo.png";
    				}

     

     

    Thanks

  4. I have the following code to pull up a "vendor" logo:

     

    while($vendor = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
    		$GLOBALS['VendorId'] = $vendor['vendorid'];
    		$GLOBALS['VendorLogo'] = GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'."vendor_images/". $vendor['vendorid'] ."_logo.png";

     

    Any suggestions how I can make it that if it does not find a file with that name, it will assign a different file to that variable instead?

     

     

    Thanks

  5. I got it cleaned up a bit using regular css. But now I have everything in a nice one column, the problem is getting it into two:

    DIV.VendorList1 ul {
    float: left;
    margin: 0;
    padding: 0;
    
    }
    
    DIV.VendorList1 li {
    align: right;
    line-height:100%;
    margin: 0;
    padding: 0;
    display: list;
    border-top: 1px solid #e5e5e1;
    padding: 15%;
    
    
    
    
    }
    DIV.VendorList1 img, img a {
    border: 0;
    padding-right: 5px;
    width: 50px;
    hight: 50px;
    
    
    }
    

  6. I am trying to set:

    ul {

    width: 400px;

    margin: 0;

    padding: 0;

    }

     

    li {

    width: 200px;

    margin: 0;

    padding: 0;

    display: block;

    float: left;

    }

     

    to only this section:

    <div class="Block Moveable Panel" id="VendorList">

    <div class="BlockContent">

    <h2>%%LNG_Vendors%%</h2>

    <div class="VendorList">

    <ul>

    %%SNIPPET_VendorList%%

    </ul>

    </div>

    </div>

    </div>

     

     

     

    What can I add to the css and the html so that it will only change the settings on that section?

     

    Thanks

     

  7. I have the following code to help generate a list of "vendors". I am trying to ad on though that it should also have the "vendors" logo. The path for the logo is /product_images/vendor_images/*_logo.png

    The * is the 'vendorid' number from the sql table. How do I tell it to pull up the vendor id# like it is pulling it up for the rest of the script, and insert into the *_logo.png.

     

    Thanks

     

     

    $GLOBALS['VendorLogo'] =  /product_images/vendor_images/???????????

     

    public function SetPanelSettings()
    {
    	$GLOBALS['SNIPPETS']['VendorList'] = '';
    	$query = "
    		SELECT *
    		FROM [|PREFIX|]vendors
    		ORDER BY vendorname DESC
    	";
    	$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
    	while($vendor = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
    		$GLOBALS['VendorId'] = $vendor['vendorid'];
    		$GLOBALS['VendorName'] = isc_html_escape($vendor['vendorname']);
    		$GLOBALS['VendorLink'] = VendorLink($vendor);
    		$GLOBALS['VendorProductsLink'] = VendorProductsLink($vendor);
    		$GLOBALS['SNIPPETS']['VendorList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('VendorListItem');
    		$GLOBALS['VendorLogo'] =  /product_images/vendor_images/???????????
    	}

  8. I have the follwoing code:

    <div class="Block Moveable Panel" id="VendorList">
    <div class="BlockContent">
    <h2>%%LNG_Vendors%%</h2>
    <div class="VendorList">
    <ul>
    %%SNIPPET_VendorList%%
    </ul>
    </div>
    </div>
    </div>

     

    As of now it list everything in one column, how would I list it in two columns instead, going in the following order:

    1 2

    3 4

    5 6

    etc...

     

     

    Thanks

  9. I have a page that has alot of cells.

     

    The problem is that I have images/flash in the cells.

     

    Is it possible for me to remove the space underneath the flash item and have the next cell begin right away, not after a small space? How about to the left/right of the image (login.gif)?

     

    <tr>
    				<td valign="top" height="100%">
    					<table border="0" cellpadding="0" cellspacing="0" width="800">
    						<tbody>
    						  <tr>
    						    <td id="dnn_TopPane2" class="toppane" colspan="3" align="center" valign="top">
    				          <tr>
    							<td height="0" colspan="3" align="center" valign="top" class="toppane" id="dnn_TopPane"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="888" height="290" id="FlashID" title="rotate">
    							  <param name="movie" value="files/Index-main1.swf">
    							  <param name="quality" value="high">
    							  <param name="wmode" value="opaque">
    							  <param name="swfversion" value="9.0.45.0">
    							  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    							  <param name="expressinstall" value="Scripts/expressInstall.swf">
    							  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    							  <!--[if !IE]>-->
    							  <object type="application/x-shockwave-flash" data="files/Index-main1.swf" width="888" height="290">
    							    <!--<![endif]-->
    							    <param name="quality" value="high">
    							    <param name="wmode" value="opaque">
    							    <param name="swfversion" value="9.0.45.0">
    							    <param name="expressinstall" value="Scripts/expressInstall.swf">
    							    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    							    <div>
    							      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    							      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    						        </div>
    							    <!--[if !IE]>-->
    						      </object>
    							  <!--<![endif]-->
    							  </object>
    						    </div><tr valign="top">
    							<td width="328" valign="top" class="leftpane" id="dnn_LeftPane"><p><img src="files/custlogin.gif" width="354" height="28" alt="login">                                
    							  <p>
    						      <p>
    					          <p>
    				              <p> </p>
    				        </td>
    
    							<td width="33" valign="top" class="contentpane" id="dnn_ContentPane"><a name="2234"></a><span id="dnn_ctr2234_ContentPane" align="left"><!-- Start_Module_2234 --></span></td>

  10. Why does this script not write anything to the database?

     

     

    Thanks

    <!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" />
    <title>Untitled Document</title>
    </head>
    
    
    <p align="left">
    WHAT<br>
    
    <select name="type" size="2">
    <OPTION VALUE="ONE">ONE
    <OPTION VALUE="TWO">TWO
    <OPTION VALUE="THREE">THREE
    </select>
    <br>
    WHO<br>
    <input name="Who" type="text" value="Who" size="40" maxlength="50" /><br>
    WHY<br>
    <input name="Why" type="text" value="Why" size="40" maxlength="50" /><br>
    
    
    
    
    <?      
    $link = mysql_connect("localhost", "root", "passw0rd")
        or die("Data base connection failed");
    mysql_select_db("test123")
        or die("data base open failed");
    
    
         if($submit)
         {
    
    	 $sql = "INSERT INTO 'test'  ('type','who','why') VALUES ('$type','$who','$why')";
               $result = mysql_query($sql);
         }
    
     mysql_close($link);
    ?>
    
    <form method="post" action="">
    <input type="Submit" name="submit" value="Submit">
    </form>
    <body>
    </body>
    </html>

  11. I am working on a script that will need to write data to many "users" assigned to different "groups". From the same page, but it will write to only one group at any "submit" button click.

     

    Which group/member # to be written to will be chosen based on user input.

     

    Which one of the following options is best for me to structure the sql database:

     

    1) One table that has for each record; a group number, and a globally unique member number?

     

    OR

     

    2) A table for each group #, and and each member number is unique only to that table?

     

    OR

     

    3) A different option that I am missing.

     

    In theory, the amount of records database wide, can grow to be in the tens of thousands.

     

    Thanks

  12. I understand how to write a brand new entry into a sql table.

     

     

    But how would I code it that it will find a previous entry based on two input variables, and modify a different cell in that entry?

     

    For example; We already have multiple tables that are populated by member #'s, just the memo field is blank.

     

    There is a form that has three fields: Group #, Member #, and Memo.

     

    So a user enters in a group #, member #, and a memo, and clicks submit.

     

    How would I tell it to find a the record in a table "Group#", that matches "Member #"  and insert the contents of "Memo" into the memo field?

     

     

    Thanks

     

     

  13. Is it possible to have using the pop-up provided in the following CSS script, a up/down scroll bar on the pop-up?

     

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>CSS PopupMenu</title>
    <style>
    div.popup
    {
    display:none;
    position:absolute;
    border:solid 1px black;
    padding:8px;
    background-color:white;
    }
    a.popup:hover + div.popup
    {
    display:block;
    }
    div.popup:hover
    {
    display:block;
    }
    </style>
    </head>
    <body>
    
    <a class="popup" href="#">Popup on hover</a>
    
    <div class="popup">
    <ul>
    <li><a href="#">Menu 1</a></li>
    <li><a href="#">Menu 2</a></li>
    <li><a href="#">Menu 3</a></li>
    </ul>
    </div>
    
    <p>
    Other text here, should not be obscured on pops.
    </p>
    
    </body>
    </html>

     

×
×
  • 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.