Jump to content

digitex

Members
  • Posts

    234
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by digitex

  1. The webhost wasn't specific beyond what I mentioned in the OP. They weren't picking on processwire or anything they just said "As your domain is installed with a web application, the hotlink protection will not work as in normal cases. This is because the references to the images are made through database entries and most of the images are embedded in the site template" their words not mine. I leave room for the possibility the tech support people have no idea what they're doing and the problem is somewhere else completely. It could be as simple as the order of the rewriterules. Since pw installs an htaccess file any additional rules would get tacked on after the pw entries. If I add the hotlink blocking back in manually and place it right after rewriteengine on it might work. Whatever the problem is I'd like to fix it. I will edit the htaccess manually and see what happens but i still think a simple module that will insert the proper rewriterule in the proper place would be great as it would keep people from having to muck about with the htaccess manually. I'll report back if changing the order of the rules helps.
  2. Hi Joss. It should work but that's how the webhost's built-in thing is supposed to work and it didn't. The htaccess rule in the link you provided is the same as the one the webhost's app inserts so it probably needs to be composed specifically for the way a CMF like processwire handles requests. I don't know enough about it to figure out how to do it. I figured a module, by someone much better at this than me, with fields to specify which file extensions to include and which domains to allow, that would insert the rule into the htaccess file in a pw friendly way, might be the ticket.
  3. I hope everyone had a good holiday. My webhost has a cool feature called hotlink protection which prevents outside sources from linking directly to an image on my site using an < img > tag and therefore stealing bandwidth. However yesterday I found a German site with one of my images on it hotlinked to my site and so I contacted my host and was told that since my site was installed using a web app (processwire) and the image references are made through database entries that their hotlink protection won't work. I searched the forum here for something similar for pw and found nothing. Is there a way (module or htaccess command) to protect images from being hotlinked? If so, could someone point me to it? If not, is there the possibility for this? There's a few photographers using pw in the showcase section and I'm sure they would appreciate the ability to prevent this kind of thing. It's no protection from copyright infringement as anyone could save the image to their HD and upload to their own server but it at least might prevent bandwidth from being siphoned off.
  4. Thanks Nik. You've given me something new to wrap my head around. I will give this a try and see what I can work out. Appreciate your help.
  5. OK. Then the problem is in my code somewhere or in my set up. I'm not using strtotime I'm just formatting the input value to match the date format stored on the database. It works when the search is confined to one, let's call it "rental term" (which is a 7 day period from saturday to saturday set up in the admin as a repeater with a start date, an end date and a status of booked: yes/no) but if the search encompasses two rental terms it returns a positive result even if only one of the rental terms is available in the date range when it should only return a positive result if both rental terms are available. I don't know if I'm making sense. I have restricted the search to only one rental term but that may frustrate anyone who might be looking for a longer stay. edit: BTW $property = $item->getForPage(); great news!!
  6. Let me know if you ever plan on running for president. I would emigrate to the U.S. just to vote for you. Works perfectly. I'm glad I found an actual issue and not another case of "what am I doing wrong".
  7. Okay, now I'm nitpicking but here goes. The solution above works great...unless someone searches for a date range of more than 1 week. The site does cottage rentals for 1 week at a time but on occasion a renter does a 2 week stay. If searching for e.g. 07/13/2013 to 07/27/2013 the search returns incorrect results again. So, what would be easier: restricting searches to 1 week at a time which I can do with the popup calendar? or is there a way to adjust the selector or filter results to allow for a extended span of time? Either would be ok with me but I have a pathological urge to try to be as thorough as possible.
  8. hey. On the weekend i went to visit a site I recently "finished" (they're never really finished) and it uses the markuptwitterfeed module. I noticed the latest tweet included an ampersand and it was displaying "&". Looking at the source markup I found: <li><span class='date'>Dec 2, 2012</span><br /> A lady 80 and a guy 79 called, excited & looking to help CEP.</li> which makes it look as if it's trying to entity encode something that was already encoded. Going to the page on twitter it displays correctly. Is this the result of me screwing something up in the setup? I can't really see how I could have but searching the forum I can't find any report of this happening and ampersands on twitter have to be pretty common.
  9. You guys keep taking me to school. Thanks Ryan. And also thanks to Soma, Diogo and Antti. I haven't been following the repeater thread and should be I suppose. This solution works great. I feel a lot lighter now.
  10. Hey Ryan. Thanks for the feedback. The date input is done using a javascript pop up similar to the one built-in to pw and I made sure the the format matched the format stored in the repeater fields. The selector, at least that part, does work. When searching for dates outside the range, it returns no results found which is expected. The only problem, which is killing me because it does seem like it should work and is the last part of the project, is that it returns any property with a booked status regardless of the date searched (if it's within the available range). My layman's theory is that it's not seeing each rental_period repeatable item as separate and is treating them as one. In other words "the dates are present and it says booked so it's valid" even though week 1 is booked and the date searched is week 8. Is that possible? On the other point, I agree, we keep the repeater items contained. There's never more than 10 items per property and at the end of each season they are turned over to the 10 items for next season. What would you say is the upper limit for repeaters? I use them on another site and it's crossed my mind to wonder how many I can add before it becomes a problem.
  11. Well, it's been almost a year since I posted in this thread. Yikes. To keep things short, I ended up putting the site up using a 3rd party booking system to track availability for the members and it worked fine-ish and everyone was happy. The big problem was that it wasn't searchable in the way we wanted so I never really let it go. Once Repeater fields were introduced into processwire I came back to the site and built a user interface for members that allowed booking info to be stored in the database, making it searchable...with the right selector. Now my problem is: The availability search, which I talked about in the first post of this thread mostly works. A user inputs a date range and it finds all pages with availability in that range, almost. I have this: $matches = $pages->find("template=property_availability, rental_period.date_from>=$fromvalue, rental_period.date_to<=$tovalue, rental_period.booked=1, include=hidden"); But it returns any page with booked=1 even when the date is not in the range searched. I've tried a number of things but so far nothing's worked. I took the input value for both dates and used strtotime to convert to a timestamp but since the date value stored on the database is a string (11/22/2012) I think it's getting stumped. Can I use strtotime on the "rental_period.date_from" in the selector or filter the results after the find to weed out the out-of-range results or even store the date info as a timestamp? Or am I missing something easy. I feel like I'm close and can finally put this one to bed. Disregard that. Not working but not for reason stated above.
  12. She emailed me her process which is the same approach I took and the same as her husband: She then reported her husband tried again using the same method and it worked fine just as it did for him the first time he tried. She knows that it's something on her computer/browser. Clicking "remove link" is something i didn't think to tell her but that's good advice. Just curious if anyone else has seen this and can confirm it's the browser doing it. Frankly I don't think it's a good idea to backwards engineer a module to be compatible with a browser as old and s****y as IE7, far better to encourage people to upgrade. If that's the problem.
  13. I had a bizarre report today from someone using this module. She copied and pasted the embed code into the body field, like I showed her how to do, and it rendered as a link. In other words the anchor tag was added automatically turning https://www.youtube.com/watch?v=j-AMV7yAiAo&rel=0 into <a href="https://www.youtube.com/watch?v=j-AMV7yAiAo&rel=0">https://www.youtube.com/watch?v=j-AMV7yAiAo&rel=0</a> When her husband tried using Safari on a mac, no problem, but when she does it on, I think, Vista or XP using IE7 (I know I know some people just don't like to upgrade) she gets the above. Anyone else ever see this happen?
  14. Greetings gentle folk of processwire. I wanted to add an insight I had when porting the blog to an existing website. Everything went great with the addition of the blog fields and templates and works like a charm. Once the blog author is logged in he/she can go to the home page and a new contextual menu displays with options to edit a post, add new post, edit profile and such. That menu resides in the "markup" directory within the site templates directory with the name admin.php. The one and only issue I had is with the link to add new post as it's coded with the page id of the posts parent. 1006. When you add the blog to an existing site you can't guarantee the parent page will have the id 1006 though and in fact for me the correct id is 1080. I fixed the link and everything is groovy. I'm only posting this as a head's up to anyone else that might try adding the blog functionality to an existing site. The features are impressive and using it is far easier than building your own from scratch.
  15. Turns out that is the case. I was going by the youtube embed code from the site which would use a URL that looks like this: https://www.youtube.com/embed/Wl4XiYadV_k?rel=0 But using &rel=0 is correct and works. Thanks for the correction.
  16. Sorry Ryan. I hate to be a pain but the new update fixes the video embed...until I add the ?rel=0 to the link. That breaks it again. If it's now working for interrobang then maybe the problem is something else particular to my server configuration.
  17. Ok. What am I doing wrong? I downloaded the new update, replaced it on the server and now all I get is the link as text on the page. I uninstalled everything so that I could reinstall from scratch and it's still not working. I went back to the previous version I got originally (v 1.0.1) and it started working again. So I tried to upgrade again with the updated version and it broke. I don't know what's causing it.
  18. OK I tested this and i get the same problem as Soma, I click preview, window opens, displays the page contents but unedited. Close the window, click preview again and it opens and displays the edits. However... It also adds some funky characters to the page body: <h3>SPREAD AWARENESS!</h3><p><img class="[url=""]\"align_right\"[/url]" src="[url=""]%5C%22/pw/site/assets/files/1058/ce_sticker009.jpg%5C%22[/url]" alt="[url=""]\"\"[/url]" height="[url=""]\"300\"[/url]" width="[url=""]\"300\"[/url]"></p> Sort of like it's trying to escape the quote characters. I'm using FF 14.0.1 and MacOS 10.6.5
  19. Good point. I second this. I tried adding ?rel=0 to the embed url and it breaks it and just displays the link as text. Currently at the end of the vids it shows some pretty unrelated and annoying, so called "related" items.
  20. Sorry Nico, I wasn't ignoring you I just haven't been back to check threads in the forum for a while. I haven't tested this yet. I will look into it this week and let you know if I have the same results as Soma.
  21. That's the goal. I think I understand enough to build a basic blog-like functionality into an existing site (I've done news publishing type things and this is similar) but the blog profile you built is so much more feature rich than anything I could figure out on my own. to have that right out of the box would save me so many tears. So I will study the profile and see if I can make it work. Thanks.
  22. @teppo, no worries. It's funny how Apeisa and I both ran into the same problem on the same day. thanks for the link, it's all fixed up at my end.
  23. I got excited when I saw this and then even more when i read the post from Ryan that this will eventually be an installable module for an existing site because i was just gearing up to build a "blog" for someone using processwire and this would be so powerful and beautiful to use because the site in question already exists using pw, they just want a blog added. Is there an ETA on this? I don't mind downloading the profile as is and grabbing what I need to work it into the current site if it's not just around the corner.
  24. Hi Ryan, when did you update the module to fix the repeating vid problem? I downloaded this module at 11:30 am EST and I'm having the same problem as Apeisa. If you updated it seconds after my DL finished I can re download. Weird coincidence on the timing.
  25. See, it's you that doesn't understand the difference, but there it is. When working with the image field on other sites with galleries: $pics = $page->my_pics; foreach($pics as $pic){ echo "<li><a href='{$pic->url}' class='pic' title='{$pic->description}'><img src='{$pic->size(85,85)->url}' alt='{$page->name} photo' /></a></li>\n"; } Multiple images, max file set to 16, it works. But on the site I am currently working on that I posted about yesterday (August 14) where the image is in a repeater: foreach($page->get("product") as $item) { echo "<div><a class='nowandthen'><img src='{$item->product_shot->eq()->url}' alt='{$item->product_shot->eq()->description}'>"; } It seems minor to you but to someone outside the scope of PHP, processwire or database driven cms development that is the difference between it works and it doesn't. You don't see it because you know it so well it doesn't even occur to you that it might be a big deal to leave that out. It's not a bug, it inexperience. I'm learning this because static html websites are a thing of the past and I need a cms that works the way I want to work rather than forcing me to work the way it wants me to. Processwire is the ONLY system out there I've found that does that. Problem solved.
×
×
  • Create New...