Jump to content

Ayon

Members
  • Posts

    141
  • Joined

  • Last visited

    Never

Everything posted by Ayon

  1. Yes that's correct except the paranteces should not wrap it all. It should be either ($month != 1) ? $month - 1 : 12; or $month != 1 ? $month -1 : 12;
  2. Ayon

    I'm back

    After not beeing here for a few years I've finally manage to stumble my way back in here Quick report about what my time has been spent on: - Family life, and my son just turned two. - Got myself a job as a system developer! My dream came true (even tho it was nothing like I expected at all) - Several dead-before-launch personal projects, which really isn't that new to me I've yet to complete a personal project hehe - and just learning learning learning the whole time. Hopefully I have som more wisdom with me that I can share on here Good to be back, even though probably there's noone here who remembers me at all Have a nice day everyone!
  3. Thanks a bunch for the quick reply AlexWD! This is a good example why I really enjoy this forum, even tho I'm not very active
  4. change this action="" to this: action="<?php echo end(explode("/",$_SERVER['REQUEST_URI'])); ?>"
  5. I've been trying to solve this issue for so long now.. I believe I'm close, but it's just the last part that I can't figure out how to solve.. I have a set of parsers and a controller. each parser is in it's own object named like Parsers_Imdb_Imdb.. What I want now is to be able to do this $parse = new Parsers; $imdb = $parse->Imdb->get_info('some random info'); So far I've managed to get into the Imdb parser object, but I 'm not able to grab the method. parsers.php class Parsers { function __construct() { } public function Imdb() { new Parsers_Imdb_Imdb; } } imdb.php class Parsers_Imdb_Imdb extends Parsers { function __construct() { parent::__construct(); } public function get_info() { echo "get_info()"; } } I've got a __autoload() to solve the class declaration.. Could anyone please help me out with this? Thanks in advance
  6. I've been trying to solve this for a while now, but still haven't had any luck. What I'm trying to do is this: $class = new BaseClass; $var = $class->load("subclass")->subclass_function("info"); Thanks in advance Ayon
  7. I'm trying to count all releases by an artist. But on the ones where artistname includes a '&' only returns 0 on my site, but in phpmyadmin i returns the correct number of releases this is the query i'm using SELECT * FROM hsdb_releases WHERE artist LIKE '%Brennan & Heart%' i guess it's cause of the '&' it's failing.. any suggestions on how to solve this? thanks in advance
  8. I was abit quick here... it's still not working as i want to i've got the following string {artist1} & {artist2} and i want to separate the to artists into an array so that i can link to each profile but for now it stores the whole string as one
  9. typical.. after trying for a days i found the solution right after i had asked the question Solution was here: http://www.smarty.net/forums/viewtopic.php?p=25287
  10. this is what i'm using.. <!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"> </head> im using smarty as well.. can that be causing this conflict?
  11. I've just started working with AJAX, and I'm completely stuck on this... So hopefully someone's able to help me out Here's the AJAX code function rate(type) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } url="rel_rating.php?type=" + type; xmlhttp.open("GET",url,false); xmlhttp.send(null); document.getElementById('rategood').innerHTML=xmlhttp.responseText; } here's where i'm trying to output the result: <span id="rategood">{$relRateGood}</span> <a href="#" onClick="rating('good')">{html_image file='images/thumb_up.png' border='0'}</a> <span id="ratebad">{$relRateBad}</span> <a href="#" onClick="rating('bad')">{html_image file='images/thumb_down.png' border='0'}</a> the "rel_rating.php" only contains this <?php echo $_GET['type']; ?> Thanks in advance
  12. I've been trying for a while now to get this regex to work, but i still haven't been able to get anything else than the curly brackets could anyone please help me out? $string = "test {id:5;name:Helbom}, test"; if (preg_match_all("/[\{(*.?)\}]/",$string,$matches)) { print_r($matches); } $smarty->display('index.tpl'); Thanks in advance
  13. wild guess $playerArray.{$match['activePlayer']}[26]
  14. yet again i really wanna thank you for taking your time to describe this so carefully and detailed man... i know I'm really learning alot of extremely useful things from this, and I'm sure alot of other people also finds your replies very useful!
  15. hard to say when you ain't showing any of you code
  16. got one more question for you... on a shared how.. how would the directory and file setup look like?
  17. wow thanks for a totally amazing answer! i now see the reason why i've been so "scared" of digging into making a framework... but i will face my fear now and start working on one... I do really appreciate you taking your time writing such a detailed answer to my questions.. _O_
  18. it means that there's no function named "mysql_insert_Username()"
  19. ahhh ok i understand now thanks alot
  20. ok it just looks to me that it's in the dedicated/vps that everything except images, scripts and styles that's protected.. might be wrong tho
  21. thanks alot for a very well explained reply roopurt18... the reason why i've been so "scared" of doing a framework is prob cause i've only looked at the sources of zend, cake and codeigniter.. think i should start studying smaller frameworks to get a better understanding without getting so confused... again thanks alot for the help
  22. so what you're saying, is that a library of generally reusable functions is waste of time? if i could have project related and general reusable functions in separate locations? right now i'm getting a feeling of that you're saying "framework or nothing" or something and at this point i do not have enough knowlege to make a framework... sorry for maybe asking stupid questions... just trying to understand Thanks for all replies so far
  23. @oni-kun: thanks for clearing that up for me @roopurt18: well i'm not trying to build a framework. this is more like a simple library of reusable stuff that i create along the way while doing different projects or just stumble over something useful somewhere on the web. so there will be no controllers, views, models and so on.. Only like a database class containing open/close function inside it along with a function for making the sql query more sequre and performing queries... the a string class with stuff for helping out with strings... basicly for making it all abit more efficient when i'm working on projects..
×
×
  • 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.