Jump to content

gregor171

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by gregor171

  1. From beginner to expert I recommend book: Appres (2008) - Matt Zandstra - PHP Objects, Patterns, and Practice imho: There is no OOP without Patterns
  2. The question is, would it be a normal site and what he would want to gain with this single-sign-on . ;-)
  3. Overhead. But I wouldn't touch it. $_SESSION could be good to decrease your database access, it is secure enough, a good way to store user specific data, by default - kept on disc.. It's a bad practice to store common data in a user's session... For each case I'd ask my self: - what do I gain/lose for this case - security risks - alternative?
  4. ;-) not quite, but http://ir.comscore.com/releasedetail.cfm?ReleaseID=377474 I like our local search as well http://najdi.si
  5. WHERE date >= NOW() Would show all the dates in the future and NOW (at this moment). WHERE date <= NOW()
  6. Variable Variables works similar way: http://si2.php.net/manual/en/language.variables.variable.php For your case: ${$xmlObj["block"]["a"][1]}="my value"; You would get your variable here, but you can't create a variable with spaces. I'd suggest to put them in new array.
  7. Guys. Thats great. Sorry for English, I'm not a native and It was a but hurry to make a page. Thanks for suggestions, I'll have them in mind as soon I'll have time for that. ?q=seo ;-) jp I know that! There has been a constant debate about this issue and since I had some problems with url rewrite in Ubuntu, so I left it as it is and guess what? I'm on the 4-th google page for some keywords (and ok was for 3 weeks on the first for some) . This is not bad at all for little more than 1 month (shifts constantly). ;-)) Thanks a lot ;-) ps: I'm also new on this forum, but will try to do some good here ;-)
  8. This seems logical question. SEO! The simplest way (for novice and also for a few pages portal) to do this is to simply make folders with index.php files inside. You fill some variable with $page_content and include root file. Sample code for /people_culture/index.php <?php $page_content = 'people_culture'; include_once '../index.php'; ?> Sample code for index.php // first you should test if u have variable already if(!isset($page_content)) $page_content ='home'; But for advanced users, this is done with apache url rewrite rule that maps everything to index.php. Than you need some mapper code to show the right content. Mapper is stored either in mysql or in php.
  9. Lol! You want right to left pager. Something like this should work: $show_pages=20; // this will show max 20 buttons $current_page = isset($_GET['page']) ? (int) $_GET['page'] : 1; // safely read current page if($pages<$show_pages){ // if we have only a few pages $show_pages=$pages; } // get the fist page $start_from = 1; $show_to_first=false; if($current_page>$show_pages){ $show_to_first=true; $start_from=$current_page-($show_pages/2); } $to_last_page_html=""; $to_first_page_html=""; if($show_to_first){ // here you populate $to_first_page_html with html of ... and button to first page } if(($start_from+$show_pages)<$pages){ // here you populate $to_last_page_html with html of last page button and ... }else if(($start_from+$show_pages)>=$pages){ $show_pages = ($show_pages/2)+$pages - $current_page; } // rearrange for sentence for left to right pager echo $to_last_page_html; for($i=($start_from+$show_pages);$i>=$start_from;$i--){ // your pager code here } echo $to_first_page_html;
  10. I think that web server is connecting to a socket. U might use server IP for that. For client Ip, you could use this. function client_ip(){ // true client ip if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { return $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { return $_SERVER['HTTP_X_FORWARDED_FOR']; } else { return $_SERVER['REMOTE_ADDR']; } }
  11. I think he was right from the start, as funny as it seems. Sub-query seems as a good idea for this. But since it's working now it was just an idea.
  12. As far as I know, it doesn't. But what you can do and it will work a similar way is to use php function serialize and store serialized object to mySql. When reading from mySql use unserialize. But. Best practice would be to use mySql as little as possible. You could store serialized objects into file system but should consider some security here.
  13. money_format ( string $format , float $number ); http://us2.php.net/money_format
  14. I think you need a bit of basic understanding of what happens on server and what on client. It's how the web works. I agree with wildteen88. Your problem sound a bit like Ajax suggestion box.
  15. There are really a lot of calendar samples on the web. With JavaScript calendar you don't need Ajax. Never the less, it's a good practice ;-) So if you want to practice ajax. put your calendar in a div, so it's easy to populate it's new content. <h2>Calendar</h2> <div id="my_calendar"> <?php require_once('testCalendar.php'); $obj = new Calendar(); $obj->displayCalendar(); ?> </div> you need some next month and previous month buttons or links somewhere in your calendar html. then you implement onclick event. <button type="button" onclick="javascript:show_month(12,2008);">previous month</button> Then you implement Ajax (should find a better sample for this, since your's is too simple and will not work in all browsers). to populate a new calendar, just put: document.getElementById("my_calendar").innerHTML=my_ajax_response_code;
  16. This is a bit unorganized code. To get an idea: you are sending value this.value to ajax function where you indicate it as cat_id, but it's not an ID. For a simple solution send just call it with parameter this, where in AjaxFunction you'll be able to read it's value. Rename parameters so they mean what they are. function AjaxFunction(sender) { var sender_value = sender.value; // or just use sender.value in your code Her comes the magic. This way you'll be able to add options simply by: sender.add(optn); Never do this in any language: for (i=0;i<myarray.length;i++) it's slow and.... var array_length = myarray.length; for (i=0;i<array_length;i++) This is a bit JavaScript with objects.
  17. Server side with some response wit text: You have already voted today. Try somehow to separate code from design (html) and do logics on client JavaScript. you basically do not need head and body tags for ajax response. Actually this can cause an error in some browsers. Just make Ajax response with simple div tag, containing the results from voting.
  18. This is common that we all know to little some times ;-))) To became seo expert o0r any expert you have to practice and try to make your learning curve as little as possible. But SEO means also that you constantly have to upgrade. Go to blogs and do some reading, from basic to expert. Join and visit some SEO meetups. They are free and will boost you with ideas. Do some practice pages and try not do to destroy ranking of some existing site ;-)) Analytics knowledge will help you (Sybex.Advanced.Web.Metrics.with.Google.Analytics.Mar.2008) Finally you can also do some certification.
  19. NIce and simple. Compliments for coding it. Some SEO optimization should be added. - liks with titles - h tags A bit of reworking on html and css. Using DIV is ok. I have a strange position of shopping chart from linux and also * Contact ยป Updates navigation is not in line. I thing that titles of models and brands are a bit too little.
  20. It's funny. Site about Villas with simple design.
  21. Not quite SEO optimized blog. http://www.johnnyward.me.uk/blog/?page_id=40 and links like that will not bring you a good Pagerank. Make some aliases like: http://www.johnnyward.me.uk/blog/?p=my-videos or http://www.johnnyward.me.uk/blog/my-videos Page title like My Videos should be put in <h1> tag. I don't like sites with welcome page. Background is a little boring. But I like simple. Simple is nice.
  22. I'd say too much contrast for your homepage. Change html table to div.
  23. Nice. You can add some customization and some more functions, perhaps rotation...
  24. Hi, I'd need feedback for my new site. http://xweblabs.com Here's the thing: It's a basic Drupal template for now, didn't have a lot of time for doing it, just added some content. I know I talk too much, but google likes it. I'm not a designer but familiar with designers work, so I need to reorganize the site, add some jQuery content and some images. I'd appreciate some ideas. Thanks ;-)
×
×
  • 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.