Jump to content

Lovac

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by Lovac

  1. ok, thanks alot m8 rly appriciate
  2. ok i have made it not sure why when using www.domain.com/about its all ok and when using www.domain.com/about/ only text shows up without any image, on source when its /about/ shows everything identical to one when its loaded propely
  3. thx alot, i understand now www.domain.com/about works , when typing /about/ it doesnt work, doesent show site propely now i need to figure how to rewrite php to generate links like i want to thx again
  4. i have menu that generates links like these <?php //check selected page is correct name format if(preg_match('/^[\-_a-z0-9]+$/i', $page)){ $file = "$page.html"; //check page exists if(file_exists($file)){ include($file); exit; } } //any faults display home page include "home.html"; function PageLinks($page, $pages){ $str = ""; foreach($pages as $k => $v){ if($page == $k){ $str .="<li class=\"selected\"><a href=\"index.php?str=$k\">$v</a></li >\n"; }else{ $str .="<li class=\"unselected\"><a href=\"index.php?str=$k\">$v</a></li >\n"; } } return $str; } ?> and navigation <?php //Full page list $pages = array( home => "Home", services => "Services", ); //Get Page selected $page = (empty($_GET['str']))?"home":$_GET['str']; //Display links echo PageLinks($page,$pages); ?> i removed some links cuz they were in my native language nothing happens when i click on menu bar, 2nd code generates it and change page, cuz its one index.php file and changes content, also changes <body id="<?php echo $page ?>"> body id. What should i do to make this to work? nothing happens aka links stays the same, no 404 or 500 errors
  5. Hello all, i have website with dyn url for example www.domain.com/index.php?str=home www.domain.com/index.php?str=about www.domain.com/index.php?str=gallery i want to rewrite like this: www.domain.com/home/ www.domain.com/about/ www.domain.com/gallery/ and this .htaccess should give that but its not working now i created this .htaccess: Options +FollowSymLinks RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?str=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?str=$1 i have htaccess for password protect in that folder, so i know .htaccess is working site is in ftp folder like this: /public_html/projects/testsite chmode: 755 im doing something wrong or bad htaccess rewrite? please help
  6. hello, plz help me hide url for my website. i have link like this: http://www.example.hr/index.php?page=1 START http://www.example.hr/index.php?page=2 ABOUT etc. how can i configure .htaccess file to mask url to something like this: http://www.example.hr/START thx in advance
  7. Hello, im using this code as menu, now i need help to form links into table <?php //Full page list $pages = array( "page1"=>"Index", "page2"=>"Page 2", "page3"=>"Page 3", "page4"=>"Page 4", "page5"=>"Contact", ); //Get Page selected $page = (empty($_GET['str']))?"main.html":$_GET['str']; //Display links echo PageLinks($page,$pages); ?> So generated link like Index, Page 2, Page 3, Page 4, Contact must be in table. And i dont know how to perfom this into php
  8. hello, need more help please. not sure if you got my msg, but this is the problem now which i didnt noticed before: this is bottom of page which uses this php, its ok, you can scroll to the end of page where is copyright (i cuted it out on this pic) http://www.imagesforme.com/show.php/919785_botom1.jpg when using menu bottom of page is cutted of, finishing edged, copyright part and grey background, all are missing and cant scroll further then contents ends: http://www.imagesforme.com/show.php/919786_botom2.jpg
  9. oh edit again, works, forgot to upload .css also..silly me works ill close it, thx
  10. hey hey, that worked. Thank you very much! edit: classes are not working in IE
  11. tried but look what happens: this is default menu: page1 page2 page3 page4 when you click on page2 for example it turns like this: page1 page2 page3 page3 but my problem is that until you click something on menu its like this, when you enter site its behaves like its allways on selected: page1 page2 page3 page4
  12. thx it works, can you help me out a bit more? i need to add class from .css to menu, how to do it? im php newbie
  13. Hello to the community, i need help with some things. im using this code to change the pages with links in menu: <?php $str = $_GET['str']; if(strlen($str) && preg_match('/^[\-_a-z0-9]*$/i', $str)) { if(!include $str . ".html") { include "index.html"; } } else { include "index.html"; } ?> then in menus this: <a href="index.php?str=page_2">Page2</a> Now what code i need to add or change to get things on menus marked on which page are you atm? Page1 Page2 Page3 Page1 Page2 Page3 (when you are on page3)
×
×
  • 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.