Jump to content
xisto Community

Quatrux

Members
  • Content Count

    2,285
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Quatrux

  1. If you want to do it with PHP, you need the links to be stored in the DB and when parsing them just use one if condition if currently requested page is one on that page?A simple way is to create an Array of links, if you don't want a database and use that array, foreach array value generate the links list and if it matches the link, make it look differently.Also you can achieve this with javascript or just simply with jquery by adding a class active or something to that link, the current url can be also fetched with javascript from window.location object.
  2. I personally suggest just to learn and use jquery or some other javascript framework which makes things much much easier.
  3. I just though about and it seems that I only have one computer of my own at home, which is a laptop and it seems to be enough for me, also my wife have a laptop too. I gave away my desktop to a friend, the older desktops where given away for recycling.So that makes two computers at my home, one old computer Amiga 1200 is still in the dark room, packed for future fun? :DAlso at work I have my own Desktop which isn't really mine, but I am using it as it would be mine.
  4. For this purpose I am using output buffering with my own callback function, for example I have an array like this: $array['[example page]'] = '<a href="http://forums.xisto.com/no_longer_exists/ Page</a>'; You just need to dynamically create it, it could be a DB value or something like that, when I just echo [example_page] and in the output buffering callback function when I have all content in a variable I can replace all the found array keys in the content with array values. I use this method for my template engine. // A class constructorfunction __construct(){ob_start();if ( !ob_start("ob_gzhandler") ){ob_start();}ob_start( array( &$this , "ob_templater" ) );} I call the ob_start 3 times for the callback, for the gzip encoding and for sending the right content size of the page, due to gzip. // Rest in peacefunction End(){ob_end_flush();ob_end_flush();header("Content-Length: ". ob_get_length() );header("Content-Type: text/html; charset=UTF-8");ob_end_flush();exit;} private $Templater = array('{language}' => 'en', '{extension}' => 'html');// the callback functionfunction ob_templater($Buffer){return strtr( $Buffer, $this->Templater );} So if you echo in the page {language} it will automatically change it to en in the template, you just need to put the values in the $Templater array and cache ir or reload on every execution or add values with the files needed, I also have an Add method: // Add valuesfunction Add($Values = array()){foreach ($Values as $Key => $Value){$this->Templater[ '{'. $Key .'}' ] = $Value;}} and all you need is just add it, this method will replace the existing values with the new values if the same key exists. <?php$this->template->Add( array('language' => $this->Language, 'extension' => $this->Extension );?> When using output buffering, ob_clean(); is really a good way to clean the contents, also you will need to use the End(); function to always end the output buffering properly and avoid using just exit; or die; even though it's nothing bad. Also, it really fast to use output buffering, it isn't much slower to use it, as the function strtr is much faster than str_replace and preg_replace;
  5. As I understand just by looking, the variable $user is not an object, it has the value of the method find_by_id();
  6. I visit a lot of news sites to see what's going on, with computers and ordinary world news.Most common sites/places besides news:Gmail,Google,Youtube,Localhost
  7. I would recommend Google docs for mobiles as it's quite enough, even though some other solution might be better, is there an offline version of google docs?
  8. to add my two cents, I've read that it's best to charge your battery at 40-80% and it's live span will be much longer, due to the cells and physics, also its very bad for the battery to be out of charge for some time an it's also not recommended to always have it on 98-100% charged, you need to use it, especially when it's new.I was searching for software which would stop charging the battery when it's charged for example only 80%, but couldn't find anything for my Samsung laptop.I have it for 3-4 years now and when it was new, I could use my laptop for 4 hours on batter, now usually I can only for ma 2 hours, which in my opinion in such a period of time is quite good. My wifes laptop MSI, which she has for 3 years, battery used to hold for 6 and more hours, as it's a smaller laptop, now it only holds for 20 minutes so she constantly needs it to be wired.I also don't take the battery out from my laptop, due to electricity problems as once in a month or twice it can suddenly disappear when you least expect it to? Besides the battery is there to be used and usually after 3-5 years of using it, you need to buy a new computer, because it got quite old.
  9. A lot of people still use command line/shell/console interface, it never died and I think if people will mostly use NUI (Natural user interface) there will be a lot of people using GUI and CLI, just for most people who only want to use simple tasks, NUI seems to be very convenient way, listen to music, look at photos and etc.Programming with NUI isn't so easy, even though I saw some programming languages for NUI of the future, where you do a lot of things in bubbles with your fingers and don't need to use your keyboard so much, but there's always a lower level of programming, there are a lot of people working with assembly and etc.In university I wrote about interfaces and I can say that GUI is really hard and not natural interface, it's really hard to learn and hard to understand and hard to use, you need to learn it, when NUI is a more natural interface for you as you use your natural gestures, which you used in your live.Old people and children needs quite a time to learn GUI and it's usually hard for them, even though a lot of children these days knows how to use a computer being 3-6 years old, but doesn't know how to tie his shoe, or doesn't understand an ordinary clock
  10. Internet for me is for information, news and seek of solutions, examples for best practices, sometimes it's annoying to read the manual, you just google search for a solution with the same or similar problem and try to do it, so it's really useful for work. But on the Internet you can easily get distracted by something else.I don't really play to much games these days...But Internet for me is also for communication
  11. Even though for a lot of reason a Desktop computer is much better, but I still have a laptop and use it, just that when I am at home, I connect it to a big LCD monitor and use a separate logitech cordless mouse and keyboard, so it looks like a Desktop computer.Laptops are good, that when there is an electricity jump or electricity suddenly goes out for a second, it won't turn off :DBut for most, Desktop is cheaper and more powerful for using, laptop may sometimes be more convenient, you can bring it to school, college, university and etc. and work with it, or you can easily go to another room.
  12. Multiple accounts could only be useful for cheating if mycents transferring would be possible, I could create 3 users and use the to talk with myself and transfer the credits to one main account, but that would be easily spotted and would be stupid
  13. I usually read the installation tips and options and never had a problem, I always don't install those kind of toolbars, which as I understand gives them a little profit, but anyway, from the programs you listed, I never got a toolbar installed, so it could be the trick that you checked the checkbox to not install it, or to install the toolbar :DOr on some programs you need to go advanced or something like that to deselect those toolbars.
  14. Really great research, sometimes it makes me wonder, that impossible can be possible
  15. I just hope the MyCENTS problems are sorted now, due to I don't want my account to be suspended, if I won't see the update I think I will need to write a support ticket.
  16. will this trick with the console on windows work on a system boot drive like C? I can 't boot windows from that drive and convert it from fat to ntfs which it's loaded and won't need a reboot?With similar tool like partition magic, I remember I expanded the driver C with 40 gb from disk D which was near and automatically I did it from the running system, it was quite fun, and I didn't lost any files of what I know, the only thing I needed to do was to defragment that there wouldn't be any fragmented files on the disk.
  17. Nice and old feature to create such a hidden folder, I remember I tried it and it was quite fun and showed it to somebody to, was quite a laugh, also this "hack" remind me of the "hack" when at school computers we used to hide the windows login window by dragging it to the left bottom corner as far as possible and it was quite invisible for people to find, especially without knowledge how to use the computer
  18. I just wanted to poke this thread, does myCENTS update or I will need to request them to be updated for me whenever I will think I've posted quite enough on the forums?
  19. It seems to be a very easy task to include google analytics in your page, but this tutorial could be a litle more specific, or maybe I am missing something, but whenever you add an action and create a function for this code, you need to set in the template where to place it? or it will place itself automatically, magically just before the body tag?
  20. Congratulations with the new plans, they seem really good for such a price, even though personally I am not in need in such really powerful hosting, but congrats with the launching of these new plans.Go Xisto!
  21. Try to clean up the dust in your laptop with a vacuum cleaner or some blowing device, it usually makes the laptop temperature lower about 2x, you don't need to open your laptop, maybe just the keyboard, depends on the model. Dust is really traps heat very well.
  22. Sorry for the double post, but just wanted to inform on the forums that I've received my credit update just Today and it seems that MyCents are up and running again on Xisto too
  23. I've received my credit update too, and also a quite good one, but didn't receive anything yet from Xisto mycents Just from Xisto forums
  24. I can't think of a fruit I dislike, but it depends on how it's prepared, for example I can't eat avocado just like that, but I can if it's in a nice salad. But I can eat bananas, olives, tomatoes, but don't really like tomato juice, it's disgusting ;)As I said in another topic, I can't eat an egg which is not cooked or baked, but it's not a fruit of course.I don't really eat meat like tongue, liver and etc. I prefer ham and etc.Also I practically don't eat anything what is from sea or lakes, I mean I can't eat all the fish, I hate them! Can't stand sea food and even sea vegetables stinks for me, I mean I even can't stand sea cabbage.I don't like sushi, but I can eat rice from it :DAlso I don't eat those kind of foods like they do in east world: snakes, cockroaches and etc. I couldn't eat snails or frogs too, it's quite disgusting for me.Moreover, I've read that people in South America likes to eat guinea-pigs, just like in Europe we like to eat chicken, it's strange for me though, as we have guinea-pigs like pets at home
  25. I've never tasted an Egg Nog myself, but I think I wouldn't like to taste it, due to a green egg is not something I would like, I prefer the egg to be cooked or baked or something like that, but I couldn't eat it like that, even if it's a cocktail
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.