Need help related to my codeigniter wallpaper script - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Need help related to my codeigniter wallpaper script (/showthread.php?tid=69652) |
RE: Need help related to my codeigniter wallpaper script - stand - 01-16-2018 @jreklund, again thank you! You gave me the hint. This works. PHP Code: $haystack = array('1','2','3','4','5','6'); Regards, RE: Need help related to my codeigniter wallpaper script - stand - 01-20-2018 Hello! A new unknown for me. When I try to add a wallpaper to favorites, returns me this error: "Wallpaper hash doesn't exists." I think I managed to find where's the problem, but I don't know how to solve it. There are 2 php files that are involved here: 1st is named wall_model.php PHP Code: class Wall_model extends WS_model 2nd PHP Code: $hash = $this->input->post('hash'); Thank you! RE: Need help related to my codeigniter wallpaper script - Paradinight - 01-20-2018 (01-20-2018, 04:14 AM)stand Wrote: Hello! Check the $this->input->post('hash'); value RE: Need help related to my codeigniter wallpaper script - stand - 01-20-2018 (01-20-2018, 04:51 AM)Paradinight Wrote: Check the $this->input->post('hash'); value I'm not sure what to check at this value. To replace with something? To delete it? RE: Need help related to my codeigniter wallpaper script - jreklund - 01-20-2018 In the form where you "add favorites", somehow 'hash' aren't populated or incorrect value. You need to find the file that adds 'hash' value to that page. RE: Need help related to my codeigniter wallpaper script - stand - 01-20-2018 (01-20-2018, 06:26 AM)jreklund Wrote: In the form where you "add favorites", somehow 'hash' aren't populated or incorrect value. Yes, just a trailing slash "/" was missing in file where send the post. (I made all URLs to be 301 redirected with an end trailing slash "/" and this one from file, don't had a "/" and every time when was called it redirects to the version with the "/" and the hash wasn't sent. I hope you understand what i meant to say . Now, once i added "/" in this file where the ajax call is made, no redirect and works. Again, @jreklund thank you for your explanation. RE: Need help related to my codeigniter wallpaper script - stand - 01-25-2018 Hi, How to trim the word "tags" from URL that is generated through this line of code: $config['first_url'] = $config['base_url'] . $get_method; The URL looks like this: _example.com/tags/tags/?page=2 [This is WRONG. The 2nd "tags" from url is wrong.] _example.com/tags/?page=2 [This is CORRECT.] PHP Code: public function index() PS: I tried to use RTRIM, but I think I didn't write in the right place and don't work. RE: Need help related to my codeigniter wallpaper script - jreklund - 01-25-2018 rtrim will delete both /tags/tags/ and /tags/, so that's no good. All links come from: $data['url'] = $this->route_links->get('tags_index_page'); So it's that functions fault. RE: Need help related to my codeigniter wallpaper script - stand - 01-25-2018 (01-25-2018, 09:09 AM)jreklund Wrote: rtrim will delete both /tags/tags/ and /tags/, so that's no good. Thanks @jreklund , but i wondered how it works on pagination for resolutions and i found the answer: If anyone sometime will need, for me the solution was to add " = current_url()". $config['base_url'] = $data['url'] = current_url(); Cheers! RE: Need help related to my codeigniter wallpaper script - stand - 02-20-2018 Hi again! I have a new situation that i can't find a solution. This is the code that generates the link: Code: <a class="good-res hide" href="<?php echo $this->route_links->build_link('wallpaper_preview', $search_replace); ?>"><i class="fa fa-eye"></i> <span class="hidden-mb">Open</span> <span class="screen_width"></span>x<span class="screen_height"></span></a> ('wallpaper_preview', $search_replace) is this: wallpaper/{W_SLUG}_{W_HASH}/{R_WIDTH}x{R_HEIGHT} ================================== The link from html source code looks like this: uhdwallpapers.org/wallpaper/daenerys-targaryen_6548/{R_WIDTH}x{R_HEIGHT}/ What to do to be like this: uhdwallpapers.org/wallpaper/daenerys-targaryen_6548/1920x1080/ =================================== Thanks for any suggestions! |