Jump to content

RyanJ

Members
  • Posts

    207
  • Joined

  • Last visited

Everything posted by RyanJ

  1. Thank you Soma, I appreciate it.
  2. RyanJ

    World Cup 2014

    It's okay to start drinking beer at noon right? I have a feeling I wont have any fingernails left after watching this group play today.
  3. GoDaddy hosting had a similar issue not too long ago with what you described. They of course never admitted fault, but coincidentally, every WP site that was affected just happened to be hosted on GoDaddy. I had a client site that was affected numerous times. I cleaned up the affected files and two days later it was there again. I moved the cleaned site to a new host and never had the issue again. *knocks on wood*
  4. The site does not happen to be hosted on GoDaddy does it?
  5. I have two installations of PW on the same domain. 1. being in the root and another being in a sub directory. I took Ryan's advice and created a symlink for the wire directory, but I was curious if I needed the following files in the sub directory as well. .gitignore .htaccess I am not sure if the ones in the root would suffice? **Edit Looks likes Teppo answered my question above and I over looked it.
  6. Hey Ryan, hope all is well. Was the option to make the page number configurable ever added?
  7. It seems you are one the right track. I too struggled with structure and read the excellent guide written by kongondo you posted many times. My advise is to set up your site locally and start building it. Read the api and pay attention especially to the selectors. In my opinion Cities, Towns and Types will all be page reference fields. Create a template for you shops and add those three fields with to it. Then you can try testing out some selectors to query the information you are wanting.
  8. Does your search.php file include to proper files as well? A link or more information from you will be needed in order to help you out.
  9. I did not see this mentioned, but If you want to skip the first row of the csv which would be your headers you can simply add two simple lines. $row = 1; $fp = fopen("./skyscrapers.csv", "r"); $template = wire('templates')->get("skyscraper"); $parent = wire('pages')->get("/skyscrapers/"); while(($data = fgetcsv($fp)) !== FALSE) { if($row == 1){ $row++; continue}
  10. This would lead me to believe you are missing the search.php file or something is messed up in it. I would start there.
  11. Hey Ryan, I was wondering if I could take you up on your offer about sharing some code examples on using the api to import. I read this topic here but I am a bit confused where the wire('pages')->uncacheAll(); would go. I currently use the csv import but as you mentioned, I am limited to about 1500 records at a time. Thanks
  12. Are you working on a shared hosting environment? If so, you will need to log into your cpanel account and increase the space. If you are unable to increase your space, you should contact them. Simply deleting some files will not have immediate results as your host does not reflect those changes immediately. I am almost certain this is hosting issue and not a ProcessWire one.
  13. Maybe proving an example of your structure you are trying to achieve would help clear up your question here I think.
  14. I think most are set to 755, but I do not see any reason why 777 should not work. It depends on your host setup. Also you may want to check your space limitations on your server. This sounds like an issue I had when I was uploading a large amount of photos. Come to find out, I was out of space and had to increase it.
  15. Check your folder permissions.
  16. RyanJ

    learning php

    I have struggled understanding OOP and just so happen run across this one. It is designed around WordPress, but could be applied to any platform. I have read a few series from the author and he has a way of breaking things down so they are easily understood. I helps make the water a bit clearer. http://code.tutsplus.com/tutorials/object-oriented-programming-in-wordpress-types--cms-20299
  17. Hi Felix, be sure utf-8 is selected when saving your csv sheet. That should do the trick for you.
  18. You added 'FieldtypePage' to the $fieldtypes array correct? What field type does the 'user' template have? Have you tried to connect a single page id?
  19. I thought that it was only a dream that I had made this post.
  20. I am not sure what qualifies for the wall of shame (though I did not know one really existed). Maybe I should have stated how much time I spent searching the forum and trying to figure out what was wrong as well.
  21. My selector worked all along. Thanks arjen for pointing out $page instead of $page->id, I was looking at teams that had no players assigned to them One of those days I guess. Please add this post to the wall of shame. DUH!
  22. I am embarrassed that I have to ask this question, but I cannot get my selector to work. I want to output a list of players that are assigned to their specific team. Each Player has a team_name field which references their team as a page field select drop down. $players = $pages->find("template=player, team_name=$page->id"); foreach ($players as $player) { echo "<li><a href='{$player->url}'>{$player->title}</a></li>"; } $page->id is referencing the team page. I have tried multiple variations using both find/get but I am missing something. Any kick in the head is appreciated. My structure is like so Players -- Player 1 Teams -- Team 1
  23. If a page contains an image, I get no error. If a page does not contain an image I get the following. Fatal error: Exception: Invalid type to Pageimages::remove(item) message. Any suggestions is appreciated. my code: $first = $page->image->first; if (count($page->image) > 1) { echo "<h4>$page->title</h4>"; } foreach($page->image->remove($first) as $img) { if ($img) { echo "<img src='{$img->url}' />"; } }
×
×
  • Create New...