Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


LeiHa last won the day on March 23 2013

LeiHa had the most liked content!

Community Reputation

6 Neutral

About LeiHa

  • Rank
    Jr. Member

Recent Profile Visitors

2,360 profile views
  1. Oh yes it is. It is showing '2' on the first line. Indeed, I named 'admin' for the default superuser when I installed PW at the first time. I guess this is why I got stuck. Thank you so much to help me, adrian. =D
  2. Thanks for your interest, adrian. I've tested the code adrian suggested above at the home page. Created User: admin Error: Call to a member function getThumb() on a non-object (line 38 of C:\wamp\www\site\templates\home.php) And tested on the sub page of the home, which named 'test'. Created User: admin Created User Thumb: /site/assets/files/41/thumbnail_contact_img.jpg Current User: admin Current User Thumb: /site/assets/files/41/thumbnail_contact_img.jpg Seems working fine this time. Thank you so much. =D
  3. Okay, I don't know why, but, img_user field is the CropImage and single image only. Some page works fine, some other page doesn't work. I've tested code below. $createduser = wire("page")->createdUser; echo $createduser->name; // is it showing the user you expect? echo $createduser->img_user->getThumb('thumbnail'); echo ' ' . wire('user')->name; echo wire('user')->img_user->getThumb('thumbnail'); At the home page, this code doesn't work. Result shows like this. testadmin Error: Call to a member function getThumb() on a non-object At the any child page of home page, Everything works fine. I guess this must be caused some other place. Thank you guys.
  4. What I was trying to do is to put user image thumbnail on the user. Whenever showing a post, user image thumbnail should be displayed along with a post. And I didn't know what caused the problem before. Thanks to apeisa. I got to narrow down the problem. wire('user') pull out the current user information. Now that, I also need to pull out current logged in user information. So that I can get the current user image thumbnail on the writing new post page, that current user is about to create. But, somehow, I got an error. And I'm thinking this causes error on my code. Thank you all. It is so grateful.
  5. Thanks apeisa. taking out of eq(0) makes work fine. I've been testing some of this issue with different way. $createduser = wire("page")->createdUser; echo $createduser->name; // is it showing the user you expect? echo $createduser->img_user->getThumb('thumbnail'); Since this works, I've put wire('user') on the first line. $createduser = wire("user"); echo $createduser->name; // is it showing the user you expect? echo $createduser->img_user->getThumb('thumbnail'); This time, I got an error. Error: Exception: Method Pageimages::getThumb does not exist or is not callable in this context
  6. Oh, I didn't notice that point. Fixed and works well this time. But, I'm still having issue with thumbnail. $createduser = wire("page")->createdUser; echo $createduser->name; // is it showing the user you expect? echo $createduser->img_lg->eq(0)->getThumb('thumbnail'); added to get a thumbnail url above and got a error message. Error: Exception: Method Pageimage::eq does not exist or is not callable in this context (in C:\wamp\www\ktest\wire\core\Wire.php line 232) #0 C:\wamp\www\ktest\site\templates\test.php(57): Wire->__call('eq', Array) #1 C:\wamp\www\ktest\site\templates\test.php(57): Pageimage->eq(0) #2 C:\wamp\www\ktest\wire\core\TemplateFile.php(125): require('C:\wamp\www\kte...') #3 [internal function]: TemplateFile->___render() #4 C:\wamp\www\ktest\wire\core\Wire.php(271): call_user_func_array(Array, Array) #5 C:\wamp\www\ktest\wire\core\Wire.php(229): Wire->runHooks('render', Array) #6 C:\wamp\www\ktest\wire\modules\PageRender.module(250): Wire->__call('render', Array) #7 C:\wamp\www\ktest\wire\modules\PageRender.module(250): TemplateFile->render() #8 [internal function]: PageRender->___renderPage(Object(HookEvent)) #9 C:\wamp\www\ktest\wire\core\Wire.php(271): call_user_func_array(Array, Array) #10 C:\wamp\www\ktest\wire\core\Wire.php(229): Wire->runHooks('renderPage', Array) #11 C:\wamp\www\ktest\wire\core\Wire.php(293): Wire- This error message was shown because you are logged in as a Superuser. Error has been logged.
  7. well. That didn't work. Nothing shows on the screen. But, this works below. wire("page")->createdUser->name; This properly shows as expected, which is 'admin'. I guess there is something wrong with it. Thanks Ryan.
  8. Hey guys. Have some question here. I've put img_user field on the user to add thumbnail image. And this code works perfectly well as expected. echo $user->img_user->eq(0)->getThumb('thumbnail'); However, I need to use this code my custom made function in it. So, I've tried several way to work out. echo wire('page')->createdUser->img_user->eq(0)->getThumb('thumbnail'); Now, using createdUser doesn't seem to work here. Any idea what would be the problem in here? Thank you =D
  9. LeiHa

    ajax data

    omg. Thank you so much, Soma. One character '/' at the end of the url makes different. Thank you. =D
  10. LeiHa

    ajax data

    Hello forum, I'm here to get a help again. This time, I'm having a trouble with ajax data. Sending a data into the same page seems okay. However, Sending a data into the different page seems not working. I don't know why. Here is the jquery code. $.ajax({ url: url, type: 'POST', data: { from: 'thispage' }, success: function(data){ alert(data); } }); If url is './' I can get this value from $input->post->from This value returns 'thispage' as expected. If url is '/different/page' I won't get this value from the above $input->post->from It seems url has to be a file, Processwire template and page created somehow. Otherwise, it won't be processed because of permission issue. So, I created template and a hidden page just for the processing ajax. Any idea what would be wrong? Thanks.
  11. Hello, Looking for a PW developer. Here is my situation. I've been trying to create a game community site using PW. And it's been 6 months and still working on it. Because of my lack of web programming knowledge, I've been having hard time figuring out all the web programming such as PHP, JavaScript, jQuery, and PW. If anyone of you can help me out, I'll be so grateful. Here are the list I need to have my site. 1. module for a community forum system 2. module for a front-end profile system work with forum 3. module for a registration system 4. security system such as IP block or something like this Feel free to contact me with proposal. Here is my email address. hyotakdesign@gmail.com Thank you PW community letting me know great the PW. LeiHa
  12. Thanks all of you. I'm starting to understand a bit. I'll look up Jquery UI roller site and see how things work. Thank you.
  13. Sorry about the confusion. I'm still trying to understand how to implement this in the frontend site. The message system in admin backend site seems wonderful and I'd like to use it in the frontend. At first, I thought that I could just use $this->error('some text'); or $this->message('some text'); in the frontend. Eventually those didn't work of course. And tried to find out how to use this system(I assume Ryan made this. So impressive!!!)
  14. I've found out that I actually have to put this code below. <?php if(count($notices)) include($config->paths->adminTemplates . "notices.inc"); ?> This code is from default.php from admin files.
  15. I've been building message and error system. And I've noticed that PW uses Jquery highlight message system, which is very easy to use. Some of PW module do this like, $this->message('message here'); $this->error('error message here'); And it seems like automatically generate markup for the Jquery to handle.(If I understand correctly) So, are message and error methods only for use inside of class? If I'm not getting it, please let me know. Thank you.
  • Create New...