Jump to content

me1000

Members
  • Posts

    183
  • Joined

  • Last visited

    Never

Everything posted by me1000

  1. I found a template in dreamweaver that uses CSS, I was just messing around but I found the awsome menu it had so I took it lol... well im having trouble first I tried it with the template page and got it to work fine. the I copied all the code over to a temp page to test it out. but the submenus aret showing up like they should. they are supose to show up right under the main menu. they look a lot like the ones on macromedia's website. Im not sure if this is a javascript error or a css error my guess is CSS but I havnt got a clue... I hope you can help me. here is the code for the page [code]     <style type="text/css"> <!-- body, td, th {     font-family: Arial, Helvetica, sans-serif;     font-size: 12px;     color: #000000; } body {     background-color: #738799; } a {     font-family: Arial, Helvetica, sans-serif;     font-size: 12px;     color: #FFFFFF; } a:visited {     color: #FFFFFF;     text-decoration: none; } a:hover {     color: #CCCCCC;     text-decoration: underline; } a:active {     color: #CCCCCC;     text-decoration: none; } a:link {     text-decoration: none; } --> </style> <link rel="stylesheet" href="emx_nav_left.css" type="text/css" /> <script type="text/javascript"> <!-- var time = 3000; var numofitems = 6; //menu constructor function menu(allitems,thisitem,startstate){   callname= "gl"+thisitem;   divname="subglobal"+thisitem;     this.numberofmenuitems = allitems;   this.caller = document.getElementById(callname);   this.thediv = document.getElementById(divname);   this.thediv.style.visibility = startstate; } //menu methods function ehandler(event,theobj){   for (var i=1; i<= theobj.numberofmenuitems; i++){     var shutdiv =eval( "menuitem"+i+".thediv");     shutdiv.style.visibility="hidden";   }   theobj.thediv.style.visibility="visible"; }                  function closesubnav(event){   if ((event.clientY <48)||(event.clientY > 107)){     for (var i=1; i<= numofitems; i++){       var shutdiv =eval('menuitem'+i+'.thediv');       shutdiv.style.visibility='hidden';     }   } } // --> </script> </head> <body onmousemove="closesubnav(event);"> <table width="795" height="388" border="2" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" style="border-collapse: collapse">   <tr>     <td width="216" rowspan="2" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" valign="top">     <div align="left" style="border-right-style: solid; border-right-width: 1pt; padding-right: 4pt"><center>       <img src="http://www.startrek4u.com/images/uperleft_logo.gif" width="210" height="123" border="0" />     </center> </div></td>     <td width="571" height="40" valign="middle" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" style="border-bottom-style: solid; border-bottom-width: 1"> <div id="globalLink"> <a href="#" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);">News / Updates </a><a href="#" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);">Series Sections </a><a href="#" id="gl3" class="glink" onmouseover="ehandler(event,menuitem3);">Movies</a><a href="#" id="gl4" class="glink" onmouseover="ehandler(event,menuitem4);">Special Features </a><a href="#" id="gl5" class="glink" onmouseover="ehandler(event,menuitem5);">Community</a><a href="#" id="gl6" class="glink" onmouseover="ehandler(event,menuitem6);">Global news </a>     <!--end globalLinks-->     </div>   <!-- end globalNav -->   <div id="subglobal1" class="subglobalNav">Latest News and updates From Site Name </div>   <div id="subglobal2" class="subglobalNav"> <a href="#">1st Section</a> | <a href="#">3rd Section</a> | <a href="#">4th Section</a> | <a href="#">2nd Section</a> | <a href="#">6th Section</a> | <a href="#">5th Section</a> </div>   <div id="subglobal3" class="subglobalNav"> <a href="#">Movie: I</a> | <a href="#">Movie: II</a> | <a href="#">Movie: III</a> | <a href="#">Movie: IV</a> | <a href="#">Movie: V</a> | <a href="#">Movie: VI</a> | <a href="#">Movie: VII</a> | <a href="#">Movie: VIII</a> | <a href="#">Movie: IX</a> | <a href="#">Movie: X</a></div>   <div id="subglobal4" class="subglobalNav"> <a href="#">Multimedia</a> | <a href="#">Downloads</a> | <a href="#">Poll</a> | <a href="#">LCARS 24</a> | <a href="#">For Webmasters</a> | <a href="#">Tutorials</a></div>   <div id="subglobal5" class="subglobalNav">The Site Forums</div>   <div id="subglobal6" class="subglobalNav">All news from the world </div> <!--  <div id="subglobal7" class="subglobalNav"> <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> | <a href="#">subglobal7 link</a> </div>   <div id="subglobal8" class="subglobalNav"> <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a></div> --> <!-- end masthead -->[/code] and this is the code for the stylesheet [code]/************* globalNav styles ****************/ #globalNav{ position: relative; width: 100%; min-width: 640px; height: 32px; color: #FFFFFF; padding: 0px; margin: 0px; } #globalNav img{     /* margin-bottom: -4px; */ } #gnl {     position: absolute;     top: 0px;     left:0px; } #gnr {     position: absolute;     top: 0px;     right:0px; } #globalLink{     position: absolute;     top: 18px;     height: 41px;     min-width: 640px;     padding: 0px;     margin: 0px;     left: 325px;     z-index: 100;     width: 581px; } a.glink, a.glink:visited{       font-size: 12;       color: #FFFFFF;     font-weight: bold;     margin: 0px;     padding: 2px 5px 4px 5px;     border-right: 1px solid #8FB8BC; } a.glink:hover{       color: #CCCCCC; } .skipLinks {display: none;} /************ subglobalNav styles **************/ .subglobalNav{     position: absolute;     top: 40px;     left: 325px;     width: 100%;     min-width: 640px;     height: 20px;     padding: 0px 0px 0px 10px;     visibility: hidden;     color: #000000; } .subglobalNav a:link, .subglobalNav a:visited {     font-size: 11;     color: #000000; } .subglobalNav a:hover{     color: #333333; }[/code] Thanks,
  2. ok here is what i have so far... im trying to add a feature to my search page that will highlight the searched words sorry for the messy code, it is scattered throughout the page, I just got all the important stuff. i left out a lot of the code, including the loop for diplaying the results. here is the problem... so say you search for the word, dog then what you see here will replace the word doggy with 'gy' removing the 'dog' part of it all together. hope you can tell me whats wrong with it, Thanks, [code] $inKeyword = preg_match("/^[A-Za-z]([A-Za-z0-9\s]*[A-Za-z0-9])*$/",$_POST['search']) ? $_POST['search'] : die("Bad Search Term Numbers and Letters only"); $result = mysql_query("SELECT * FROM $sTableName WHERE PAGE_CONTENT LIKE '%$inKeyword%'"); $text_output = strip_tags($message, '');    $search_results = substr($text_output, 0, 200);    //begin highlighting searched word    $searchterm = array($inKeyword); foreach($searchterm as $searchwords) { $search_results = eregi_replace($searchwords, "<span style=\"background-color: yellow;\"$searchwords </span>", $search_results); } //end highlight search word    //display the search results echo "$link <br> $search_results ... <br><hr>"; [/code]
  3. Thanks for trying, if your still having trouble I will PM you my email, and you can email it to me.
  4. any change I could get a hold of this script that loggs your visitors? Ive been trying to come up woth something but its not at the top of my priority list right now!
  5. well a really simple way of doing this is just adding the URL of the image. then in the page add something like, $avatarimage = "<img src=".$avatarurl.">"; then set the avaraturl variable to -Avatar- in the database file you are using. im not sure what you are using for a database. (mysql flatfile ect...) but just enter the avatar url the same way you do the name hope this helps, someonemight want to make sure my code syntax is alright though
  6. ok here is what i have so far... im trying to add a feature to my search page that will highlight the searched words sorry for the messy code, it is scattered throughout the page, I just got all the important stuff. i left out a lot of the code, including the loop for diplaying the results. so say you search for the word, dog then what you see here will replace the word doggy with 'gy' removing the 'dog' part of it all together. hope you can tell me whats wrong with it, Thanks, [code] $inKeyword = preg_match("/^[A-Za-z]([A-Za-z0-9\s]*[A-Za-z0-9])*$/",$_POST['search']) ? $_POST['search'] : die("Bad Search Term Numbers and Letters only"); $result = mysql_query("SELECT * FROM $sTableName WHERE PAGE_CONTENT LIKE '%$inKeyword%'"); $text_output = strip_tags($message, '');    $search_results = substr($text_output, 0, 200);    //begin highlighting searched word    $searchterm = array($inKeyword); foreach($searchterm as $searchwords) { $search_results = eregi_replace($searchwords, "<span style=\"background-color: yellow;\"$searchwords </span>", $search_results); } //end highlight search word    //display the search results echo "$link <br> $search_results ... <br><hr>"; [/code]
  7. well i know its posible to execute a php function it. is there a way i can recode the page content output to make this posible? as I realy need to be able to do this.
  8. Exactly! well there are a few things I would like to do, but I wiould like to make a random page generator. this would need to be php driven because it would need to grab a random page from the database. and since im am added pages all the time, I dont want to add a line to a JS every time I add a page. there are several random things I would like to do. ive bee trying to see how the server would inturprate it and send it to the browser. and tyhis is what ive come up with. [code]<?= <? echo = "Hello world"; ?> ?> [/code] with this I can see that there are extra php tags (<? ?>) (when I test this out it shows nothing at all) so i try this. [code] <?= echo = "Hello world"; ?> [/code] This shows "echo = "Hellow world";" on the page its not inturpreted as saying "hello world". I hope someone is able to help me.
  9. no the page works fine, with standard HTML. the site is already up a running off of a mysql database. I just gave you some sample code. im using the _ for easier viewing (by myself). im trying to display a page from the database which works fine with standard HTML. but If I want to add php to the page (the page being stored in the database) it comes out with wierd results (as shown below)
  10. ok say you wanted to do an include [code] <? include("somepage.php"); ?>[/code] well if a add that code to the page, then it comes out as nothing at all. but if you get rid of the <? ?> tags then it comes out include("somepage.php"); on the page. its the same way with every command.
  11. Ok ive got my database driven web site Im using [code]         $query = "SELECT * FROM $sTableName WHERE ID=$inPageID LIMIT 1";     $_CONTENT = mysql_fetch_array(mysql_query($query)); <?= $_CONTENT['PAGE_CONTENT'] ?> [/code] to insert the content, into the page. Now if I wanted to add a php command into the page (the part thats stored on the database) im not sure what to do. can someone help me out here? Thanks,
  12. changed it and still no luck heres the whole loop... [code] <? echo "<TABLE BORDER=0>"; while ($row = mysql_fetch_array($sql_result)) { $page_id = $row["ID"]; $page_title = $row["PAGE_TITLE"]; $link = 'http://www.site.com/index.php?page_id='.$page_id; echo "<TR><TD>$page_title</TD><TD>$page_id</TD></TR>"; echo '<TR><TD><input type="text" name=myText value="<?php echo $link; ?>"  style="color: #000000; background-color: #CCCCCC" readonly></TD></TR>'; echo '<TR><TD><hr></TD></TR>'; } echo "</TABLE>"; ?> [/code] never mind I figured it out echo '<TR><TD><input type="text" name=link value="'.$link.'" style="color: #000000; background-color: #CCCCCC" readonly></TD></TR>'; simple enough! :P
  13. OK I have a non editable text field inside of a loop. I want the text field value to be the $link var... [code] $link = 'http://www.site.com/index.php?page_id='.$page_id; echo "<TR><TD>$page_title</TD><TD>$page_id</TD></TR>"; echo '<TR><TD><input type="text" name=myText value="<?php echo $link; >?"  style="background-color: #CCCCCC" readonly></TD></TR>'; [/code] can you please explain to me why this doesnt work?
  14. Thanks, so I had the right idea just a little off in the sintax! :)
  15. ok Im using a simple search script that I wrote but when there was no results returning It shows up blank and I want to change that. heres my script [code]while($r=mysql_fetch_array($result)) {     // change page type #'s to words $page_type = $r["PAGE_TYPE"]; $new_type = ""; if ($page_type == 1) { $new_type = "Home"; } else if ($page_type == 2) { $new_type = "Series"; } else if ($page_type == 3) { $new_type = "Movies"; } else if ($page_type == 4) { $new_type = "Special Features"; } else if ($page_type == 5) { $new_type = "Gaming"; } else { $new_type = "Unknown"; }       //modify these to match your mysql table columns       $title=$r["PAGE_TITLE"];    $message=$r["PAGE_CONTENT"];    $id=$r["ID"];    $link = '<a href ="index.php?page_id='.$id.'">'.$new_type.': '.$title.'</a>';    $text_output = strip_tags($message, '');    $search_results = substr($text_output, 0, 200);       //display the data       echo "$link <br> $search_results ... <br><hr>";    }[/code] Im thinking I would need something like if ($r < 1) { $show_results2 } else { echo "$link <br> $search_results ... <br><hr>";} will this work?
  16. My advise is not to use layers, Thats the problem right there. I tried using layers on my site once and quickly learned that they are usless. tables are the best way. You should be able to do evrything with tables if you try hard. :)
  17. I dont see anytihng wrong with it, But thats not saying that much... if I understand how PHP works firefox shouldnt be the problem. {edit} Tried the code on my server, and it works fine!
  18. Well that was my first attempt, I will try it a diffrent way. I know it was extrememly easy for my to install when I did it. again make sure that line reflects the location of the script (and only that line) try this, A friendly sugestion... your code looks a lttle messy you dont have any head html or body tags, also you were missing the close form tag. [code]<? include('dbconnect.php'); ?> <html> <head> <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript"> tinyMCE.init({     mode : "textareas",     theme : "advanced",     plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",     theme_advanced_buttons1_add_before : "save,separator",     theme_advanced_buttons1_add : "fontselect,fontsizeselect",     theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",     theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",     theme_advanced_buttons3_add_before : "tablecontrols,separator",     theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",     theme_advanced_toolbar_location : "top",     theme_advanced_toolbar_align : "left",     theme_advanced_path_location : "bottom",     plugin_insertdate_dateFormat : "%Y-%m-%d",     plugin_insertdate_timeFormat : "%H:%M:%S",     extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",     external_link_list_url : "../example_data/example_link_list.js",     external_image_list_url : "../example_data/example_image_list.js",     flash_external_list_url : "../example_data/example_flash_list.js" }); </script> </head> <!-- use <body onload="HTMLArea.replaceAll()" if you don't care about      customizing the editor.  It's the easiest way! :) --> <body onLoad="HTMLArea.replaceAll()"> <form action="addnews.php" method="post"> <br>Title: <br><input name="title" type="text" value="Title"> <br>Author: <br><input name="user" type="text" value="Name"> <br>Date: <br><input name="date" type="text" value="<?php print date("F j Y"); ?>"> <br>Icon: <br><input name="icon" type="text" value="Icon URL"> <br>Message: <br><textarea name="message" cols="40" rows="6" value="Message"> </textarea> <br>Password: <br><input name="password" type="password"> <br><input name="submit" type="submit" value="Submit"> <?php $password="yourpassword"; //change this to the password you want if ($_POST['password']==$password){ //DO NOT CHANGE THIS LINE if (isset($_POST['submit'])) { include("dbconnect.php"); $title = addslashes(strip_tags($_POST['title'])); $user = addslashes(strip_tags($_POST['user'])); $icon = addslashes(strip_tags($_POST['icon'])); $message = $_POST['message']; $date = addslashes(strip_tags($_POST['date'])); $sql = "INSERT INTO newscms SET title='$title', user='$user', icon='$icon', message='$message', date='$date'"; if (mysql_query($sql)) { echo("Your news has been added."); } else { echo("Error adding entry: " . mysql_ error() . ""); } } ?> </form> </body> </html>[/code]
  19. Ok ive started on a new search, but I dont know how to limit hte # of charactors it returns. Its also showing HTML and I only want it to show plain text, but on the output results of it its showing the whole page, I want to limit the number of characters it returns to like 50 or 100. heres the code of my page [code]<? require_once ("config.php"); $search=$_POST["search"]; //get the mysql and store them in $result //change whatevertable to the mysql table you're using //change whatevercolumn to the column in the table you want to search $result = mysql_query("SELECT * FROM $sTableName WHERE PAGE_CONTENT LIKE '%$search%'"); //grab all the content while($r=mysql_fetch_array($result)) {     // change page type #'s to words $page_type = $r["PAGE_TYPE"]; $new_type = ""; if ($page_type == 1) { $new_type = "Home"; } else if ($page_type == 2) { $new_type = "People"; } else if ($page_type == 3) { $new_type = "Things"; } else if ($page_type == 4) { $new_type = "Ships"; } else if ($page_type == 5) { $new_type = "Types"; } else if ($page_type == 6) { $new_type = "Tech"; } else if ($page_type == 7) { $new_type = "Food"; } else { $new_type = "Unknown"; }    //the format is $variable = $r["nameofmysqlcolumn"];    //modify these to match your mysql table columns       $title=$r["PAGE_TITLE"];    $message=$r["PAGE_CONTENT"];    $id=$r["ID"];    $link = '<a href ="index.php?page_id='.$id.'">'.$new_type.': '.$title.'</a>';       //display the row    echo "$link <br> $message <br>"; } ?>[/code]
  20. Try this, I just installed this like 2 days ago... [code]<? include('dbconnect.php'); ?> <html> <head> <title>Full featured example</title> <!-- TinyMCE --> <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript">     tinyMCE.init({         mode : "textareas",         theme : "advanced",         plugins : & #34;table,save,advhr,advimage,advlink,iespell,insertdatetime,preview,zoom,flash, searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,-emotions,fullpage",         theme_advanced_buttons1_add_before : "save,newdocument,separator",         theme_advanced_buttons1_add : "fontselect,fontsizeselect",         theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",         theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",         theme_advanced_buttons3_add_before : "tablecontrols,separator",         theme_advanced_buttons3_add : & #34;emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,ful lscreen,fullpage",         theme_advanced_toolbar_location : "top",         theme_advanced_toolbar_align : "left",         theme_advanced_path_location : "bottom",         content_css : "example_full.css",         plugin_insertdate_dateFormat : "%Y-%m-%d",         plugin_insertdate_timeFormat : "%H:%M:%S",         extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",         external_link_list_url : "example_link_list.js",         external_image_list_url : "example_image_list.js",         flash_external_list_url : "example_flash_list.js",         file_browser_callback : "fileBrowserCallBack",         theme_advanced_resize_horizontal : false,         theme_advanced_resizing : true,         apply_source_formatting : true     });     function fileBrowserCallBack(field_name, url, type, win) {         // This is where you insert your custom filebrowser logic         alert("Example of filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);         // Insert new URL, this would normaly be done in a popup         win.document.forms[0].elements[field_name].value = "someurl.htm";     } </script> <!-- /TinyMCE --> <!-- Self registrering external plugin, load the plugin and tell TinyMCE where it's base URL are --> <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/plugins/emotions/editor_plugin.js"></script> <script language="javascript" type="text/javascript">tinyMCE.setPluginBaseURL('emotions', '../jscripts/tiny_mce/plugins/emotions');</script> </head> <body> <form action="addnews.php" method="post"> <br>Title: <br><input name="title" type="text" value="Title"> <br>Author: <br><input name="user" type="text" value="Name"> <br>Date: <br><input name="date" type="text" value="<?php print date("F j Y"); ?>"> <br>Icon: <br><input name="icon" type="text" value="Icon URL"> <br>Message: <br><textarea name="message" cols="40" rows="6" value="Message"> </textarea> <br>Password: <br><input name="password" type="password"> <br><input name="submit" type="submit" value="Submit"> <?php $password="yourpassword"; //change this to the password you want if ($_POST['password']==$password){ //DO NOT CHANGE THIS LINE if (isset($_POST['submit'])) { include("dbconnect.php"); $title = addslashes(strip_tags($_POST['title'])); $user = addslashes(strip_tags($_POST['user'])); $icon = addslashes(strip_tags($_POST['icon'])); $message = $_POST['message']; $date = addslashes(strip_tags($_POST['date'])); $sql = "INSERT INTO newscms SET title='$title', user='$user', icon='$icon', message='$message', date='$date'"; if (mysql_query($sql)) { echo("Your news has been added."); } else { echo("Error adding entry: " . mysql_ error() . ""); } } ?> </form> </body> </html>[/code] BTW the code your using looks a little off to me. I added a small javascript to it and it worked. alos you need to change this line <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"> to reflect the location of your script :)
  21. Cool Thanks Ill keep that in mind!!!
  22. Thanks A million that fixed it. I got to remember that now. lol I really appreciate your help!
  23. im getting a phrase error on line 25. Parse error: parse error, unexpected T_ECHO in /htdocs/cms/pages.php on line 25 line 25 is the first echo $new_type;
×
×
  • 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.