Jump to content

John W.

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by John W.

  1. Thanks. I've used image->size on other sites. Problem is client has uploaded some 320x260 ... if they go back and edit now, it will refuse the image already uploaded. Guess they will just have to replace the image with a larger version if they have to go back and edit an article in the future. thanks,
  2. Running PW 2.7.2 I've built several sites using PW. One question that I have is is there a module, or planned upgrade in the core to refuse (fix) uploaded images that don't meet the Min width or Min height? In the description PW says "Optionally enter the minimum width and/or height .. images that don't meet these minimums will be refused." (the field /image upload is required) example: Currently, if I set Max width to 320, Max height to 260 and leave "refuse images exceeding max dimensions?" unchecked. This is fine, if they upload a 1024x768, I'll let PW scale/crop it down to 320x260. In the next section I set Min width/height for uploaded images to 320x260. however, when a user uploads a 800x200 image, for example, PW won't refuse it. PW will just scale the image to 320x200 (for example)...when the minimum is set to 320x260. Something, with the settings enabled above, just seems to be off. Maybe PW (in the PHP core) is not checking the dimensions of the dimensions after the user uploads it and PW scales/crops it?
  3. Good day. Short Version: How can I redirect a template that doesn't have a .php file back to its parent? ------- Detailed Version Question: I have a a template that doesn't have a php file. The template is basically used to hold other templates. For instance, I have a php file called business-directory.php which display's all (child) businesses from the business categories template. Business Directory business-categories (2) ABC Fence Roper Cattle So, if a user goes to /home/business-directory/ it fetches and displays all children from business categories. However, if someone manually types in /home/business-directory/business-categories/ I want to redirect them back to the parent 'business-directory'. (without having to create a .php file called business-categories.php) I was looking at the template settings for 'business-categories' and came up with what you see in the photo. I basically toggled off View Pages for guests to get the URL options, saved it, then toggled back on View Pages for guest (everyone) and it still retains the URL for the redirect. This below seems to work as long as the page is not moved. I tried putting in $page->parent->url;, but got an error that this was a 'Forged Request'. Any suggestions?
  4. No, I didn't. It's almost as if ProcessWire is displaying the page to visitors but when FaceBook connects back, ProcessWire is saying, the page isn't here. I went as far as re-installing processwire last week. If've got a page right now, when I hit share it showed my 404 page. I went straight over to facebooks Sharing Debugger, dropped in the url and clicked Debug. Boom! Fetched the page contents perfectly...went back to the page, now when I click share the properly contents are there. Absolutely insane. My client reported if they create an article and publish it and get a 404 when they click share, if they go in and copy the article contents, delete the article, re-create it with the same contents - no 404.
  5. Still not resolution on this one. The only thing I can think of is hook the on page save and use the facebook api to submit the url and loop until it comes back without a 404. I just really shouldn't have to do this just to integrate a sharing plugin. :/
  6. I used a repeater field on my site to handle arrest reports. (It's much easier for the user than say adding a new entry for each person arrested as you would a new page). Basically, my client creates a new entry with the arrest report section then starts adding repeater "records" and data which include: name dob offense mugshot ... repeat the above for each offender This is a small county newspaper and we rarely have over 100 arrests listed per report. I noticed when about 60 repeaters are added after that I get a server timeout when trying to edit the page. I bumped up max_execution_time to 90 seconds and I get a 500 error. When I set max_execution_time to 60 seconds it loads -- but that is really pushing it. It was my belief that the Repeater field type could handle lots of repeaters, with the exception of getting into say a thousand or more, but 60-70? This may take care of it for this project, but, I'm thinking about future projects. I noticed that ProFields has a Table field type and watched the video, however, I didn't see any option of adding an image field in there. Is that possible? This would allow for fast entry of data with the addition of an image for each record. Any other suggestions are appreciated. thanks.
  7. Yeah, I had the non-www in the FB App settings, working the other day I figured adding both might resolve the problem. but, nope.
  8. Good morning folks. I've been going around in circles since last week on this one. I've got caching turned off on my site, but, wondering if there is an extra step I need to take when publishing a page when using FacBook's social plugin? I've got a template for my news articles with FaceBook's social share plugin embedded. After publishing the page, going to the article on the front end on the site, and clicking share, the share dialog in many cases will have the right page content but frequently it comes up with my custom 404 page. FaceBook must be pinging back, in order to server up the custom 404, - so that seems to rule out the server blocking the ping-back. Using the FaceBook debugger I can Show Existing Scrape information and see that it had a 404 response. However, without changing anything on the site, if I use the debugger to re-scrape the page there is no 404 and the page comes right up. it seems as though even if the page is published and has been loaded in the browser when FaceBook calls back to my processwire site it's telling FaceBook the page doesn't exist. When this happens, I go over to the debugger, click re-scrape, and the page comes up fine -- but, I can't keep doing this all day long. (see the attached images) Any advice or help would be greatly appreciated. If it is any help I'm using Processwire 2.7.2 and Zurb Foundation 5
  9. I really love the TextformatterVideoEmbed module. I was wondering, Ryan, if you could modify the module to handle both youtube video id's and youtube playlist id's? Before I dig into the code on the module, I figured I would ask if you could consider making this an upgrade to the module as it would be very handy. Rather than fork it to a new module, it looks like a simple addition you could make to the 'official' module that would be very beneficial: A good example, where this is handy, is like on a news site I've built, the reporters may take 3 videos of a two hour county commission meeting and upload them to YouTube and instead of dropping in 3 videos into a news page, they could drop in a youtube playlist. Thanks a bunch for the consideration!
  10. Hi gang, I've finished up a site for a local newspaper. Right now I'm looking at the ScheduledPages plugin whereas, of course, I can schedule pages to publish on certain dates and times. I was wondering if there is a variation of this module that allows one to schedule when pages are published in addition to posting the page link to my clients FaceBook business page wall? So, in simple terms a news article can be scheduled to publish at a given date/time and then when it fires off also post a link to that article/page to my clients FaceBook business page wall. thanks!
  11. Problem solved. For anyone that runs into this problem here is what I found. Since /arrests/ has other data holder templates you can't pass the name of any of the children or you will get a 404 since those templates don't have a page. Work around is call, as in my example, instead of /arrests/february-2016/, since february-2016 is only a template without a page this generates an error. Instead, enable url segments on /arrests/, then call /arrests/s/february-2016/ Since there is no possibility of their being a data template named "s", it will load without a name collision. You can replace "s" with anything, as long as you know that none of your data templates will have that same name.
  12. The only other thing I could think is to remove February, March etc from under /Arrests/ then create a root page called Arrest-Data(without a .php) just for the data like so... Home About Us Arrests (loads arrests.php that pulls data from Arrest-Data below) Contact ---- Arrest-Data (2) February 2016 March 2016 etc... Trash
  13. I seem to be having trouble with url segments on a projects. I'm working on an arrest report system and will provide the structure. What I have is a page called arrests in the back end that loads up an arrests.php file. Under arrests, in the back-end (with URL segments enabled), I have two pages that only store data, they don't load actual .php files. structure in the back-end (see attached photo) /arrests (loads arrests.php) -February 2016 - a page that uses a template called arrestlog that only stores data, it has no .php file -March 2016 - a page that uses a template called arrestlog that only stores data, it has no .php file when my site loads /arrests/ my arrests.php performs a find('template=arrestlog') where I display only the most recent addition, in this case data for March 2016. So, if you go to /arrests/ in a browser, arrests.php does a $pages->find() and displays only March 2016 data. What I'm trying to do is create a "next" link that loads : /arrests/february-2016/ So, when arrests is passed a url segment1 I can pull that url segment, then run a find on it to display february data. I could use /arrests/?id= method to callback arrests.php passing a parameter, but, I'd rather use a friendly url segment if possible. The end result is I'm getting a 404. Assistance is much appreciated.
  14. On the second question regarding placing artists under various genres and allowing the end user to sort the artists for each unique genre I think I got it. At lunch, I got the bright idea of implementing the above, but, reversing the page field implementation. In other words, instead of going to artists->artist and selecting the genres they belong to I did the opposite. I set up where you could go to genres->rock and select the artists -- using AsmSelect the user can now manually re-arrange the list of artists that is unique to each genre. So now the user can manually sort artists differently under each genre. example: music->ROCK ABBA ZZ-TOP JENNIFER LOPEZ ROLLING STONES JOAN JET BRITTANY SPEARS music->POP JENNIFER LOPEZ BRITTANY SPEARS ABBA Thanks, I thought about the same thing over lunch (above) -- was doing my post about this as you were posting the idea.
  15. Thanks. But, that's not what I'm shooting for. The above would just allow the end user to manually sort the artist names under artists.
  16. Thanks for the greetings! I threw your suggestion together and it works well (screenshot attached). I did nearly the same thing yesterday, separating genres from artists. One twist, though, something I expect from one client in the near future. Second question - In the back-end I have a particular client that likes to drag and drop artists in random positions in a specific genre. For instance, he likes to arrange artists in what he deems their importance is to him. So, the artist 'ABBA' might show up as the first artist listed when you list the ROCK genre but it if I fetch all the artists out of FOREIGN he may have ABBA anywhere, such as the last in the list. By separating genres and artists - as you described - the first thing that comes to mind is adding a 'Sort Priority' field for each artist, however, the problem therein is that no matter what genre is listed that priority would take precedence when any genra listing is displayed. P.S. Bookmarked that link, some goodness to read there. Thanks! Thanks. Think I've almost got my head wrapped around it between you and kongondo's info.
  17. Hi Guys, I've been stuck since yesterday and after reading forum threads, watching pw videos, I still can't seem to get this. I'm setting up a directory where an item can be in multiple categories. I sorta have it working to a point from what I read from an old post, and a reply that Ryan had left regarding the structure and using the Page Fieldtype, here : https://processwire.com/talk/topic/2541-business-directory-website/?p=24591 To keep it simple for testing, and try to explain the problem, I have a page called music with 3 categories, ROCK, POP and FOREIGN. If I click on POP, for example, I can add the band ABBA -- at which point I also have a complete list of all categories that the user can also choose to put ABBA in the FOREIGN category (I'm using the Page Fieldtype to list all categories). However, when I save the new entry the band ABBA only shows up in the category it was originally created (POP), but, doesn't show up in the FOREIGN category. It just seems logical that I could add a band, select what categories I want that band in, and once I save the entry the band would show up in each of the categories as well. I've tried to type out all the details a few times and it seems it would be easier to attach a PDF of the screen shots for the sake of simplicity - and also someone may see some setting that I'm overlooking. I do appreciate those that could get me on the right track with this. music_multiple_categories_pwire.pdf
  18. I have a system set up in processwire whereas I have an Editor role that can edit content of pages. On my site I have pages like the Home Page, Contact Us, etc, whereas I want them to be able to edit the page content. On the other hand, I have a page set up with children for a product gallery that I want them to be able to add, edit and delete categories and products within each category. For example: (edit only) Home [edit] Contact Us [edit] Product Categories ..... Celing Fans [edit] [add] [delete] ............ ceiling fan #1 [edit] [add] [delete] ..... Lamps [edit] [add] [delete] ............. lap #1 [edit][add][delete] And so on. In my Editor role I enabled page-delete, however, I want page-delete not to show up on the home page, contact us, only in the product category and product pages. Any help is appreciated. thanks,
×
×
  • Create New...