Jump to content


digitex

Member Since 15 Sep 2011
Offline Last Active Yesterday, 02:59 PM
-----

#31626 Got a 501 error on field deletion

Posted by digitex on 01 April 2013 - 06:16 PM

ProcessWire doesn't output any 501s, so those are most likely getting sent from the web server before PW even gets a chance to boot. If you were running Apache, I'd say the first thing to look at would be mod_security meddling in requests. But since you aren't using Apache, maybe there's something like mod_security that is blocking certain patterns/combinations of requests that it thinks look suspicious? That would be my best guess anyway. 

 

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.

 


 




#30522 Quick guide to the comments system

Posted by digitex on 19 March 2013 - 12:38 PM

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.




#30158 Got a 501 error on field deletion

Posted by digitex on 15 March 2013 - 09:56 AM

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




#29554 Repository of php Scripts for Templates

Posted by digitex on 08 March 2013 - 01:29 PM

Digitex

 

I am with you there.

 

However, as soon as I find a really good solution, I am trying to store it as a reusable something, even if it only a reference. 

 

If I am feeling sensible, I even remember to comment it so I know what it is.

 

I do this with music too. I am a professional composer, but if I come up with a really nice brass arrangement, I often store it separately - I wont use it again exactly as it is, but it is really helpful if I am looking for a particular sound.

 

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.




#29460 Numeric Input Type won't save

Posted by digitex on 07 March 2013 - 11:43 AM

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. :)




#29454 repeater inside itself

Posted by digitex on 07 March 2013 - 11:01 AM

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.




#23549 Request for hotlink protection

Posted by digitex on 04 January 2013 - 11:16 AM

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.


#21555 Markuptwitterfeed entity encoding

Posted by digitex on 04 December 2012 - 01:18 PM

Let me know if you ever plan on running for president. I would emigrate to the U.S. just to vote for you. :lol:

Works perfectly. I'm glad I found an actual issue and not another case of "what am I doing wrong".


#21003 Stumped on two issues

Posted by digitex on 28 November 2012 - 01:30 PM

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. ^-^


#19445 Blog Profile

Posted by digitex on 05 November 2012 - 05:37 PM

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.


#17891 Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)

Posted by digitex on 03 October 2012 - 04:16 PM

For YouTube, you would actually be adding "&rel=0", not "?rel=0", i.e.

http://www.youtube.com/watch?v=Wl4XiYadV_k&rel=0

This works here. Is it possible that you used '?' rather than '&' ? If not, please post the exact URL that doesn't work.


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:

http://www.youtube.com/embed/Wl4XiYadV_k?rel=0

But using &rel=0 is correct and works. Thanks for the correction.


#15135 Repeatable Fields

Posted by digitex on 14 August 2012 - 12:46 PM

I think you just don't get it! :P

If you're image field has a max of 2! images, the field returns an ARRAY, EVEN IF only 1 images is uploaded.

So you have to threat it as an array. Hence the example of using $item->product_shot->first()->url. Will return the url of the first image in stack, EVEN IF there's only 1 image uploaded.

You can also use $item->product_shot->eq(1)->url; to retrieve the second one. And so on.

Hope that helps :D


Well, you're right, I don't get it. I'm learning though. Thanks for pointing that out. ;)

You have to admit, your post above http://processwire.c..._180#entry15113
was a bit on the cryptic side for someone who's not fluent like me. I get it now though.

Thanks for everyone's efforts. It was another learning experience at least.


#15115 ProcessWire Conference 2013 / London / Cambridge

Posted by digitex on 14 August 2012 - 08:54 AM

Well, if a conference doesn't happen, for whatever reason, a get together is still a nice idea even on a smaller scale. Pick a park, get some potato salad, I'll bring the hot dogs and beer. :lol:


#14368 How do you save form data to an existing page?

Posted by digitex on 02 August 2012 - 08:29 AM

That's the ticket. Thanks Ryan.

You've probably written the equivalent of a Steven King novel by now just answering the questions of people like me. I hope you never get tired of it. It's appreciated.


#8912 Quick guide to the comments system

Posted by digitex on 05 March 2012 - 11:14 AM

You can do it like this:

$num = count($comments);
$options = array('headline' => "<h3>$num Comments</h3>");
echo $comments->render($options);


Thanks Ryan. The only downside to this is it counts all comments including the ones waiting for moderation. The number may not always agree with what's being displayed. Not an issue though.

See here:
http://processwire.c...g-alternatives/


Didn't even see that until you pointed it out. My search skills are wanting it seems. Thanks.

You could edit the module and remove it, but I don't recommend doing so. The email field is not displayed to anyone, it is just used as a way to recognize when a comment is made by someone that already has an approved comment (so they don't have to wait in a moderation queue). If you were certain you didn't want it, you could always pre-populated it with some fictional address and hide it with CSS.


I did the pre-populate and hide option.