Jump to content

nik_jain

Members
  • Content Count

    60
  • Joined

  • Last visited

  • Days Won

    1

nik_jain last won the day on April 27 2015

nik_jain had the most liked content!

Community Reputation

2 Neutral

About nik_jain

  • Rank
    Regular Member

Recent Profile Visitors

2,209 profile views
  1. hooks are fine. Its the API stuff that gets me. Ex: Code to set an extra value to a user programmatically, was too hard to figure out. From some forums posts: $uid = $this->currentUser()->id(); $userData->set('my_module', $uid, 'a_key', 'Here is a value'); Still not sure if this is the right approach. Drupal forums are also rather 'unsearchable' . No way to separate Drupal 7 posts from search results. But I have decided to not take the scratch approach, suck it up for once and dive deep into a framework. A plugin works, but certain custom coding would require deeper understanding of the platform. I am tempted to give symfony a shot instead, but I have been guilty of jumping too quickly from with a platform before... arghh
  2. I am struggling with drupal. The way I have always struggled with any CMS. There seem to to be many modifications requiring specific undocumented ways, that I find very frustrating. Would vastly prefer a framework, but the lure of the front end being handled by a CMS themes is very attractive, as its my biggest weakness. Suggestions ?
  3. Thanks maxxd. Not at all interested in doing it from scratch. Have done that before and it takes a lot of time. Yes, It is for work, kind of. No deadlines as such, but time is money. hmm, looking into drupal, and I guess you are right. It seems this way there would be very little coding. Makes me feel like an idiot for wasting so much time doing things from scratch. Not keen in wordpress btw. Seen too many bloated, loading-separate-jquery with each plugin websites.
  4. Columns are just for giving an idea. Far from complete/accurate
  5. Making a website with the following features. Wondering how everyone would go about coding this.. Tables: User: email, location id, other.. User location: coods, area,colony,city Posts : post, location id, type id, user id Posttype: type Functions: User sign up/in, with social signup Show posts: Filter by location, date , type etc. User Profile User set location Post details Similar posts Add post Moderate posts / Users So a fairly standard user registration + user posts + have profiles + browse posts website. With the addition of setting user location and filtering posts by location. Would you use a CMS or a framework or go commando by hacking together various components? How much time do you anticipate to take to code the backend ? Please assume TDD is followed. Thanks
  6. yeah I know about array_map. Hence why I mentioned I wanted to emulate it. I guess it is some kind of 'academic exercise' . I guess I should explain more clearly what I am thinking here. I was reading about on functional programming , one example focused on iterating an array. Where the imperative/normal way used a for loop to go through the array, and the functional way used the array_map function. This made me think how the array_map function internally scans the array. Does it use some functional way or does it use a for loop internally .
  7. I do not know the technical differences between for and foreach, but whichever is 'normal' here , it is not functional ? If so, is there a functional way of iterating an array that does not use loops ?
  8. This is just for fun/exploring. The normal way of iterating over a array is using a for() loop. The functional way is to use array_map . I am trying to write/emulate the array_map function in a functional way. Emulating the array_map using a for loop is easy: function array_map_me_normal($callback,$arr){ $returnArr = []; for ($i =0 ; $i < count($arr);$i++){ $returnArr[] = $callback($arr); } return $returnArr; } But emulating array_map using a functional approach seems to be tricky. Not sure if its even possible. I think it should be possible.. function array_map_me_functional($callback,$arr){ if (empty($arr)){ return false; } return [$callback(array_pop($arr)), $callback($arr)]; } The above is incorrect ofcourse. Returns increasing nested array. But I couldn't do better. Is there a way ? or will an array_map function always be using for loop under its hood ? Thanks
  9. eh I cannot ask about where I can post jobs, without implying I am looking for a job. logic 101
  10. Hey thanks for such a detailed critique. But I was able to only get a few things. The site is not being marketed at all. Because A. I don't know how to at all ! B. The poor response discouraged me. The points I think got were: - The site content is such that generally people are unlikely to search for its functions and find it on google ? - It can only be used by someone who already knows what the tool will do when they come to page ? i.e the objective of the website/tool isn't being made clear at all ? - I didn't mention the parent ecommerce website ? ok. This is a big oversight on my part. It doesn't even tell the target country. damn! didn't understand .. About uneasy design: Could you please elaborate ? Is the text too little ? too much ? no pics ? Its a pretty standard bootstrap template.. maybe that 's the problem ? Maybe offtopic, but how much should I look to spend to improve its design. I think I need a UX person... Thanks a lot again.
  11. @Barand - sry didn't realise about the black text on black background thing, as I was using a 'dark night extension'
  12. Me PHP guy looking for work. Where all on the internet can I add my 'I am PHP guy, looking for other PHP developers to work for' ? I have posted in the 'services offered' section and on reddit. Any other place ? upwork is an option , but a very discouraging one. No replies after 10 well thought out bids. Lets not even talk about freelancer.com Thanks
  13. https://fallinprices.com/ - Its affiliate site for an ecommerce site. What it does: Basically for user it shows products by several criteria - price,brands, features etc. Then the user can enter their email and get notifications related to their chosen criteria. So a user can get to know about 'new prodducts' n price changes , of product A from brands 'B C' of color 'green' between price 'P1 P2' . Problem is I haven't got a response at all! No criticisms either, but just went under the radar . Is it hard to understand ? Are the number of products too low ? Am I not a design guy , but seems fine to my eyes. Made it responsive as well. Comments Please. Thanks
  14. Use JavaScript to keep adding more input fields. I suggest to use jQuery for this . See jQuery docs or google to find how to append elements using jQuery. Something like: if (clicked on last form element){ $parentForm.append('<input>New elements />') } This will require learning and getting familiar with jQuery and maybe javascript as well. This is the frontend part. You will also need to pass these new form values to server. For this Each field should have a unique 'name' html attribute or you can use an array See this. Then handle the POST data with PHP. And store appropriately in a database.
  15. Easy. Just use sessions. Sessions are user specific data stored on the server/site for an extended period of time. So they don't get deleted between requests. Browser sends session cookie on every request to identify which data in the session belongs to them. session_start() ; // at the top of every page //Store $_SESSION["favcolor"] = "green"; $_SESSION["favanimal"] = "cat"; //Fetch if (isset($_SESSION["favcolor"] ) && $_SESSION["favcolor"] ){ return $_SESSION["favcolor"] ; }
×
×
  • 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.