Jump to content

digitex

Members
  • Posts

    228
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by digitex

  1. Thanks Joss, I wish I could say you helped but I'm still stumped. I added the contextmenu to the plugins but in Firefox it doesn't work. On a whim I tested it in Safari and the contextual menu works in Safari but it still doesn't insert the style to align right. The text jumps over to the right in the textarea, though no mark up to make it do that in the front end is inserted into the html and upon saving, it doesn't stick. I wish I knew javascript. If I could get it to insert a class (which does work) instead of an inline style I could just add a couple of classes to the css and it'd be done.
  2. I've encouraged the owners of a site to go in and start adding/editing text to get the hang of it and they immediately began trying to justify text to the right. That's not an option in the pw tinymce module (by default) so they inserted a series of spaces to force text to the right. Not good. Especially in a responsive layout. Given the choice of a bunch of spaces or an inline style I'd prefer inline style (lesser of two evils) but for the life of me I can't get tinymce to work. I have the text-align buttons showing up in the tool bar and added "style|text-align|" to the valid elements but it's not retaining it. I also set inline_styles to true in the inputfieldtinyMCEConfigDefaults in the js file. What am I missing/doing wrong?
  3. Your best guess is a good one. It was a mod_security problem. It only started happening after the host switched from Apache to LiteSpeed so I made the leap it was an incompatibility with litespeed but it may have only been a result of how the server was configured. They commented out the mod_security rule and things went back to normal.
  4. Follow up note: jquery pagination for comments is very helpful. It keeps things nicely organized and compact. I used Pajinate but there are quite a few options. I'm probably not telling most on this board anything they didn't already know but for those that don't... there you go.
  5. Gentlemen. What's the word on comment pagination? I'm facing a situation right now in which paginating comments would be very useful. If a page receives 50 lengthy comments it makes for a lot of scrolling. It was on the roadmap in 2011 but I have not seen anything on whether it has been implemented. If not, is there a possibility of generating your own markup for the comments and making it paginate in the same way you do with search results? Edit: I've been able to solve a lot of my own problems lately. Maybe that's a good sign. I realized that pagination can be achieved through jquery so I am going to implement that. I'll let you know how it goes for anyone else looking to do the same thing.
  6. OK. I got another 501 error. I created a textarea field (lowercase) and tried to add an hr option to the tinyMCE advanced options. I've done it before without problem but here it gave me the error "The requested method is not implemented by the server" when I tried to save. The host has only recently moved to litespeed servers. Edit: I just want to mention this isn't really a call for help. I added the element I wanted using phpMyAdmin so it's all good. I could have also added it right into the tinyMCE module. I'm just reporting this as a possible incompatibility with LiteSpeed Servers for anyone else with an pw install on litespeed. cheers
  7. I panicked unnecessarily. It's definitely a problem, the field in pw has a cap but in phpmyAdmin it's showing lowercase and that seems to cause trouble. I dropped the table field_daily_specials and deleted it from the fields table and it fixed things. I recreated daily_specials in lowercase and it's hunky dory now.
  8. I have a weird habit of sometimes typing a cap on the first letter of field names. I usually catch it because I've had problems with that in the past but I didn't catch it this time. So I created a new field and with a capital and saved. I noticed it, and having not used the field in any templates yet decided I could delete the field and re-do in lowercase. I got a 501 Not Implemented server error and it won't delete. Is there a way around it? If I drop the table in phpmyadmin will it be removed from pw? It's installed on a litespeed server. Any help would be very appreciated.
  9. I get you Joss. My thoughts were directed at the OP where everfreecreative was saying it would be good for the less PHP literate. I think it would be very useful for the PHP pros as a time saving tool. Any novice such as myself, who wants to learn, not so much. To me it's sort of like allowing calculators in schools. Once you know how to do mathematics in your head or on paper then a calculator is a handy time saving device but if you use it in place of those skills you'll likely never learn them. Why do long division on paper when a few button pushes on a calculator gets you the answer. Still a good idea for those that want to use it, no judgement on my part, I'm just pointing out that if you want to learn, it may not help you do that.
  10. Just an opposing view but I like writing the code myself. I like writing it over and over each time I need it. I like researching how to do a certain task by going through the threads here and I don't mind asking for help every once in a while, not to have the solution handed to me, but just to get a hint, point me in the right direction kind of thing. The fine members here are happy to provide code samples and snippets that I analyze before using and I find the generosity astounding. I like doing it myself because with each repetition it becomes easier, I understand it more. If I could scroll through a pre-made selection of code snippets and only had to copy and paste, I don't think I'd learn very much. A repository of code snippets is a good time saving idea for when I am a PHP expert and know it backwards and forwards but as long as I'm still a novice and trying to learn, I think I'll do it the hard way.
  11. I can confirm Dave's problem. An integer field that I set to Number (html5) in Numeric Input Type, reverted to Text when saved. Dave s not crazy.
  12. You are so much better at this than I am. Oddly, I understand what you've done. 6 months ago i wouldn't have been able to say that. You're schoolin' me. Even so, I would never have thought of doing that on my own. It's a great solution as long as I make sure they understand the importance of maintaining the format price=label. They're pretty savvy so that shouldn't be a problem. Thanks Ryan. I owe you again. Tell me where to send it and I'll ship you some Canadian beer.
  13. OK. I'm confused. For the record is it true you cannot put Repeater B into Repeater A? I'm developing a site for a restaurant and the repeater field is perfect for doing a menu. Each menu item can have the title, writeup and price field maybe even with an optional image in a repeater so they (the owners) can add, delete or rearrange menu items easily. However, certain menu items such as Garlic Bread have multiple variants: half order, half order with cheese, full order, full order with cheese each with it's own price point. I thought, for ease, it would be great to add a variant repeater to the menu item repeater so that different variations of an item could be added, or deleted with a simple click. Is that possible or is it not possible? I could make each variant a separate menu item but that seems like a less elegant solution. As does using a textarea and just writing everything out. Alright then, re-read thread and Ryan's last seems to confirm you shouldn't put a repeater in a different repeater. I would like to second the request for this. There are uses for it. I'll figure something else out.
  14. Thanks Dave. I suspect it is fine to do as well. I saw a line further down that goes something like this (paraphrasing, if one can actually do that with PHP): if !$author->isSuperuser() And while that's unrelated it made me think that if the $superuserrole variable is being used elsewhere, taking out the code that defines that variable would likely throw a fatal error and the site's live so I thought I'd get a more expert opinion than my own. Luckily, it doesn't take long to realize there's an error and put things back as they were so I'll see what happens. Thanks again. EDIT: It seems fine. Don't know why I was worried. Cheers.
  15. Hi Ryan. I installed the blog profile for someone else and of course, for set up and troubleshooting I have a superuser role for myself. I'm the kingmaker though and not the king and I'm never going to write a blog on this particular site (or anywhere probably) but when I go the the authors page I see my username. I didn't give myself the author role and I don't want anyone seeing my username on the site. It's someone else's personal blog and might lead to confusion. So.. I looked into the authors.php template and found: $authorRole = $roles->get('author'); $superuserRole = $roles->get('superuser'); $authors = $users->find("roles=$authorRole|$superuserRole, sort=title"); on line 33- 35 which explains it. I'm wondering now, is it as simple as removing that and leaving: $authorRole = $roles->get('author'); $authors = $users->find("roles=$authorRole, sort=title"); or would that create new problems. I read up on this thread and couldn't find anything on this situation, unless I missed it.
  16. That's a good thought. I made the same test on a different pw website using a different host and it seems to work. I don't know why it won't on this one but when all other options are run out then the only thing left is the host. I doubt I'll get anywhere with them since they already told me it won't work so short term I deleted the image that was being hotlinked and long term I may look at new hosts. Thanks Joss and Soma for tackling this with me.
  17. I did some more testing with the image I uploaded to the root, via FTP rather than through pw. I moved it progressively down into the nested folders, first site > assets > files > to finally 1056 and tested the hotlink block each time and it worked each time. And yet, the image that was already there, uploaded via the admin interface loads when hotlinked. I don't understand everything in that htaccess file, is there maybe something else in there that might override the blocking rule for images uploaded through or contained within pw?
  18. An htaccess file effects the directory it sits in and all it's sub-directories so since I have only one htaccess and it's in the root, It should effect everything. Plus, all the rest of the rules in that file are for pw and they all work as normal.
  19. Sorry. I had company for dinner so had to break to make it. I added the rule directly below RewriteEngine on. It did nothing so I tried setting the rewrite base just to see what happened and moved the rule to below that. That didn't do anything either.
  20. Well that is interesting. I just did a test of my own. I uploaded a jpg to the root directory of my server (outside the site directory). Created a test.html doc and added in a hotlink to that image and uploaded that doc to my other, unrelated domain. Blocked. No problem. Works like a charm. Did the same thing with an image within pw and the image loads. Not blocked. It does not work.
  21. Maybe. Maybe not. It still don't work. I've tried several different approaches. I have two domains with this webhost personally, one is just static html (until I get to it and re-do it) and the other is pw. The same hotlink block works for the static site but I can not get it to do a thing on the pw site. I don't doubt the tech may not be an expert but if it don't work it speaks for itself. Soma, are you currently using this particular rule in htaccess on a pw site and it works or are you just saying it should work? FYI you don't need jpg|jpeg just adding jpe?g does the trick.
  22. 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.
  23. 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.
  24. 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.
  25. 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.
×
×
  • Create New...