Jump to content

DaveyK

Members
  • Posts

    289
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by DaveyK

  1. I get that you can set a cronjob every hour if you see that interval fit. I was merely trying to explain that setting a cronjob on a specific time set by the user is not the way that is supposed to work and I was indeed a little short sighted in not mentioning that every hour is an option, but you wont get it down to the minute. You COULD set it to the minute, but the smaller the interval is the bigger the server is you will need. Google calendar can easily support a minute support, simply because Google is Google. Thanks for pointing that out though.
  2. Count how many floats they use for the columns and rows (which is the only relevant stuff for template #2) they use. You will find none. And even if you find them, I also have a column design, much like template #2, which use no floats. You are free to point out anything that is untrue but to expect that I would suggest that they use 0 floats on the entire page is absurd. I was talking about the layout with columns which he was trying to achieve and they dont use a single one there. I dont even see how that link is relevant OR how you are helping the OP with it. Also, I am pointing out that, in my experience, a layout based solely on floats is BOUND to go wrong. If you see that differently, I respect that but at least share why. Care to share more of your profound knowledge, especially how fixed width designs can be fluid, or are you just here to judge? In my experience a fluid design is responsive and adjusts to the screen size as best as it can. I know you are much more experienced, and I mean that, but I have no respect for anyone who will judge anyone like that without at least sharing a like. To me, your last post was offensive and I would easily consider it trolling. I am trying to help the OP and I dont think anything I said was unheplful.
  3. Use an encryption class in PHP. You are trying to reinvent the wheel and make it square instead of round (not nearly as good). I respect that you are trying to write this on your own, but encryption algorythms are really complex. Besides, you want to create a database from every character in the database? For one, there will only be encrypted characters in your database, so you dont want to target the characters in the database but those you are receiving from the front end. In the end, you can always run a replace from every know character (which are quite a few) and it would be a breeze to break if anyone really wanted to.
  4. Well, you can set up the cronjob to run, say, once a day for now, and it gives the user an overview of the reminders he has today. You shouldnt adapt the cronjob to the user. Just embrace the fact that you cant get it right on the minute, or even on the hour.
  5. Sure, I get that, but that its still no guarentee you will actually get reminded, as you also point out.
  6. If you would follow your logic, the email would only be sent if you load the page, which is not really the best. I dont need a reminder if I am already viewing the reminders.
  7. Looks like a JSON array. You should decode the array from JSON to PHP and then access it like any other array.
  8. http://php.net/manual/en/function.imagecopy.php That should help you. You should look at editing the $dest_y, I THINK. I am not entirely sure tho. Presumably something like this: imagecopy($image, $image_y, 0, $height_x, 0, 0, $width_y, $height_y);
  9. First thing I can think of without really going into your script is that imagejpeg() doesnt provide its third argument, which is quality. By default, the quality is roughly lowered to 75%. You can set it to 100 as well.
  10. On your both templates: #1 - First of all, I like that you are focusing on your positiong and CSS right now. Thumbs. - You seem to get attached to setting static heights and width (namely on div.body), why are you doing that? A div, by nature, is a block element and will always be 100% of the width and height of its parent element, unless it is: floated itself, set to a different display value (such as display: inline) OR every child element is floated. - Because you set a static width, I can scroll and see something like this, even tho my screen isnt smaller than usual (1600x900). - I dont see scroll bars, which is odd considering you will want your site to expand at some point. - Because you have static heights and you use floats, your page is FAR from anything dynamic. Say I had you make this site for me, and I added a lot of content, it actually wouldnt show as seen on this screenshot. Are you still such a fan of floats? Do you still think they are "easy" ? #2 - This is the kind of fluid layout that is being increasingly popular (in my opinion). I would suggest you look at google+ since they really rock it. - Floats floats floats. I suggest you look at G+, they pull it off without any floating. Learn from the big guys. - THe design appears fluid, but it actually isnt. A fluid design would mean that the page changes depending on the current page width. I wasnt expecting it to be, but I am still putting it out there.
  11. It indeed does have a stunning amount of similarities with codecanyon. Are you sure Lanka Institutes is happy with the copying ?
  12. Sure you can float everything, but Im just saying divs arent meant to be floated (not that that means anything, really.). Also, if you float everything you need extra clear: both or something to make everything act as expected, while if you do something like: <div class="section_right"> </div> <div class="section_left"> </div> .section_right{ width: 150px; // say its 150px wide float: right; position: relative; } .section_left{ margin-right: 155px; // 150px + 5px for spacing } That will work flawlessly on any page on any width on any browser on any device. Just because you can, doesnt mean you have to. You can also position absolute everything, so why dont you.
  13. From a design practise: I wouldnt make everything float... I mean, why would you? And you should create more paragraphs in your text. This way, its just too much. You want some parts to stand out! Also, I would think that the message textarea is also required in your form, making all inputs required, making the star (*) redundant.
  14. Yes, I have all that info. Thank you, that might just solve my problem. Ill let you know as soon as I tried this, probably later today. I will only use the first card to replace strings on the page, but all the other cards will be displayed normally.
  15. Are you sure the queries run in the first place? Try echoing something or perhaps (for development): $q= mysql_query($query); if ($q!== false) { echo 'query was succesful'; } else { die('Query "' . $q. '" failed: ' . mysql_error()) } the difference between what you do and what I describe above is that you always get a confirmation that the query actually did something. In your case, if you dont see an error you just assume that the query ran. Perhaps it doesnt even go that far in your script because of a previous error. Also: echo mysql_affected_rows(); // This will tell you how many rows were affected, or updated in this case.
  16. $structure[0][cards][0][info] That part is static, then comes the page type, in this case city $structure[0][cards][0][info][city] and then just check if whatever comes after ':' isset in the array, in this title $structure[0][cards][0][info][city][title]
  17. $result_date= $date - $date_bought; You cant do this. You are trying to substract two strings. Also, even if you got this to work, with the current math the answer will always be 7 days.
  18. $page->page_title Is a variable I fetch from the database. Its just a string, like "Welcome!" or information. HOWEVER, since I wish to use it as a page header on other places too, such as this page (http://easycaptures..../2329582622.jpg) I want to store a string in the database which the PHP can replace with a variable.
  19. I get that, but how am I supposed to be doing this? I have absolutely no idea as to how this works. I am using this code (really raw, wrote it today). I want it to convert something like "_DATA[title]" to "$structure[0][cards][0][info][city][title]" if (strpos($page->page_title, '_') !== false) { $array = explode('_', $page->page_title); unset($array[0]); foreach ($array as $k => $var) { if (strpos($var, '[')) { $array = explode('[', $var); if (in_array($array[0], $data_sets)) { $variable_path = $array; unset($variable_path[0]); foreach ($variable_path as $k => &$key) { $key = substr(trim($key), 0, -1); } // $str = 'structure[0]'; // var_dump(isset($structure[0])); // var_dump(isset($$str)); // print_array($structure[0]); // var_dump($str); // var_dump(isset($$str)); if (isset($$str)) { $structure['page_params'][] = array('str' => $array[0], 'var' => $$str); } // print_array($variable_path); } } } } and, well, I am stuck. Thats why I am here.
  20. Let me visualize this for you guys. This is the screen shot: http://easycaptures.com/fs/uploaded/654/2329582622.jpg $structure: Array ( [0] => Array ( [structure] => row [cards] => Array ( [0] => Array ( [view_id] => 1 [card_id] => 1 [status] => 1 [name] => user_profile_general_info [title] => Information [card_min_status] => 1 [cache_time] => 1800 [col_span] => 2 [order_by] => 1 [info] => Array ( [user] => Array ( [id] => 1 [email] => [email protected] [name] => Davey Kulter [status] => 9 [avatar] => http://trekeffect.images.user_images.s3.amazonaws.com/1_avi.jpg [oauth_uid] => [oauth_provider] => [signup_date] => 2013-05-23 03:14:42 ) ) ) ) ) [1] => Array ( [structure] => column [cards] => Array ( [0] => Array ( [view_id] => 3 [card_id] => 3 [status] => 1 [name] => user_profile_views [title] => Recent views [card_min_status] => 1 [cache_time] => 1800 [col_span] => 1 [order_by] => 2 [info] => Array ( [views] => Array ( [0] => Array ( [id] => 12 [type] => city [title] => San Francisco [city] => Array ( [id] => 12 [name] => San Francisco ) [state] => Array ( [id] => 5 [name] => California ) [country] => Array ( [id] => 236 [name] => United States ) [img_src] => http://trekeffect.images.user_images.s3.amazonaws.com/4_161.jpg [url] => /show.php?type=city&id=12 [master_url] => /location/united-states/san-francisco/12 [time] => 1369825876 ) [1] => Array ( [id] => 19 [type] => attraction [title] => Mauna Kea Summit [city] => Array ( [id] => 6 [name] => Island of Hawaii ) [state] => Array ( [id] => 12 [name] => Hawaii ) [country] => Array ( [id] => 236 [name] => United States ) [img_src] => http://trekeffect.images.user_images.s3.amazonaws.com/4_36.jpg [url] => /show.php?type=attraction&id=19 [master_url] => /attraction/mauna-kea-summit/19 [time] => 1369482664 ) [2] => Array ( [id] => 60 [type] => attraction [title] => Cathédrale de Notre Dame de Paris [city] => Array ( [id] => 9 [name] => Paris ) [state] => Array ( [id] => [name] => ) [country] => Array ( [id] => 76 [name] => France ) [img_src] => http://trekeffect.images.user_images.s3.amazonaws.com/4_111.jpg [url] => /show.php?type=attraction&id=60 [master_url] => /attraction/cathédrale-de-notre-dame-de-paris/60 [time] => 1369397312 ) ) ) ) ) ) [2] => Array ( [structure] => column [cards] => Array ( [0] => Array ( [view_id] => 2 [card_id] => 2 [status] => 1 [name] => user_profile_treks [title] => Treks [card_min_status] => 1 [cache_time] => 1800 [col_span] => 1 [order_by] => 3 [info] => Array ( [treks] => Array ( [0] => Array ( [trek_id] => 2 [title] => Hawaii 2013 [return_time] => 0 [depart_time] => 0 [default_trip] => 1 [trek_status] => 2 [member_status] => 3 [total_activities] => 0 [activity_types] => Array ( ) [last_activity] => Array ( ) [total_members] => 1 [users] => Array ( [0] => Array ( [id] => 1 [name] => Davey Kulter [mail] => [email protected] [trek_status] => 3 [avatar] => http://trekeffect.images.user_images.s3.amazonaws.com/1_avi.jpg ) ) [url] => /show.php?type=trek&id=2 [master_url] => /show.php?type=trek&id=2 [cover_photo] => http://trekeffect.images.system.s3.amazonaws.com/default/trek_large.png ) ) ) ) ) ) ) Am I overcomplicating this? YES. Absolutely. But I am just doing the best I can without any pro helping me. Well, up untill now
  21. Good catch, I missed that...
  22. No, the issue is that I have that array structure with the variables I need to display my cards. All that works, no worries. But I also have a page title COMPLETELY seperate from the cards. I want that title to be defined from the variables inside the structure array. How can I access an array when I create it from a string <_>
  23. Well, right now I am using PDO like I used mysql_*, except for the binding of params. Dont get me wrong, I want the array to look like that because each key of structure is a part of the structure I am building inside the page. This is very confusing <_>
  24. If you are about suggest an ORM , I am not gonna do that. I only just started using PDO and I really dont feel like two those two things at a time right now. Here is an example of $structure: Array ( [0] => Array ( [structure] => row [cards] => Array ( [0] => Array ( [view_id] => 4 [card_id] => 4 [status] => 1 [name] => city_profile_general_info [title] => Information [card_min_status] => 1 [cache_time] => 1800 [col_span] => 2 [order_by] => 1 [info] => Array ( [city] => Array ( [id] => 9 [type] => city [title] => Paris [city] => Array ( [id] => 9 [name] => Paris ) [state] => Array ( [id] => [name] => ) [country] => Array ( [id] => 76 [name] => France ) [img_src] => http://trekeffect.images.user_images.s3.amazonaws.com/4_93.jpg [url] => /show.php?type=city&id=9 [master_url] => /location/france/paris/9 ) ) ) ) ) ) so in the database I store something like :title, so now I want the php to replace :title with the city title "$structure[0][cards][0][info][city][title]".
×
×
  • 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.