-
Posts
868 -
Joined
-
Last visited
-
Days Won
1
Everything posted by DaveP
-
If you haven't seen it already, go and see Avengers Assemble (and stay right to the end of the credits).
-
Best practice for staging to live database synchronization
DaveP replied to evanmcd's topic in General Support
Soma, that's cool. I had seen the module but not fully appreciated what it did. -
Best practice for staging to live database synchronization
DaveP replied to evanmcd's topic in General Support
I'm with stillmovingdesign on this one - that's exactly how I have done it a couple of times with hardly any issues. The only thing last time was images inserted in content through tinymce didn't seem to have the correct path, but as there were only a couple of pages involved it wasn't a big deal. -
If you want to get responsive with the background-image try https://github.com/danmillar/jquery-anystretch
-
Remove all line breaks from file shown to visitor
DaveP replied to Lars282's topic in General Support
<?php $text = trim($text); $text = str_replace('\r', '', $text); $text = str_replace('\n', '', $text); ?> ...in various combinations will remove whitespace characters from the ends and <return> & <newline> from anywhere in $text. -
Some images not responding to size - please help!
DaveP replied to onjegolders's topic in General Support
It might be something else entirely, but Googling 'gd2 image size limits' does produce some tales of woe similar to yours. -
Some images not responding to size - please help!
DaveP replied to onjegolders's topic in General Support
If some are being resized properly, you must have GD2 available, but you can look for it in phpinfo, just to be sure. I'm only guessing, but it might be an execution time or memory limit issue on your server if some have worked and others not. Is there anything in the server error logs? -
According to Google, it's only 20-odd miles or so...
-
Yes, that would be great - less than an hour for me to Manchester/Warrington/Merseyside.
-
I have run a wiki before (different software, so not much help), and they do attract spam like flies to something or other, so I'd recommend battening down the hatches sooner rather than later.
-
Wahey, snagged User ID 2! S'pose that means I ought to get involved... (Are they going to stay separate logins, or have I just wasted my time?)
-
And you could do the same without jQuery just by adding value="Search" to the <input> declaration. (Just sayin'.)
-
There are a few options, including Javascript <form action="SCRIPT-NAME" method="post"> <input type="text" value="Search..." name="search" onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" /> </form> and in HTML5 <input type="text" name="search" placeholder="Search..." /> which works in most up to date browsers (but I think not IE9, although I haven't checked recently).
-
<?php if ($page->photo->eq(0)) { ?> <img src="<?php echo $page->photo->eq(0)->url; ?>" alt="<?php echo $page->photo->eq(0)->description; ?>"> <?php } else { ?> <img src="<?php echo $config->urls->templates; ?>pics/nophoto.png" alt="Sorry, no picture available"> <?php } ?>
-
Investor area, best way to layout permission-only pages
DaveP replied to onjegolders's topic in General Support
You can create such a page on the fly - just include some code like this in your template <?php if($pages->get('properties/property_1/rates ') instanceof NullPage){ $newpage = new Page(); $newpage->template = 'rates'; $newpage->parent = $pages->get('template=property,name=property_1'); $newpage->title = $title; $newpage->save(); } ?> You might need to use a couple of variables to make this cover the possible eventualities, but it works. -
Although I haven't done it myself, I understand that Piwik has an API you could use for page view counts and more.
-
Antti, don't worry about the pull request - no hurry at all, it was only a couple of minor changes that don't really alter the functionality. I have changed the version I'm using a good lot more, and it is going to be $sanitize that is doing it, I just am not sure how to tell for sure and change whatever needs to be changed to make it work how I want.
-
I am using Antti's excellent Discussions Module to build some degree of forum functionality into a site and am using wysiwym.js to allow Markdown input. The problem is that between hitting <Submit> and the message being stored in the database, any actual html is being stripped out - links and anything between blocks. I know everything (quite rightly) is passed through the Sanitize function, but I would like to be able to control what is and isn't stripped out.Any suggestions?
-
I love but wiki.processwire.com would probably be the logical choice.
-
An added complication in a WP network (running multiple blogs from one codebase), you end up with 2 levels of prefixes! So you might have a wp-posts table and a wp-1-posts and wp-2-posts tables. (I have changed the prefix to something other than the default on mine, though 8) )
-
Ryan's account is very accurate and very familiar! Trying to achieve and then maintain PCI compliance is a nightmare. In my previous job I wrote and maintained an on-line shop. Because I knew the codebase intimately, fixing problems there was easy, but (even though we were on a VPS) there was a great deal that the hosting company had to do as well, even as far as arguing about false positives and really trivial stuff. I don't miss it! However, I did come across an interesting bit of reading on the subject, regarding taking a web business outside PCI scope, which may be relevant to this discussion.
-
If you could live with the lack of support by older browsers, you could just use CSS3 pseudo selectors.
-
Supplementary question - what's the best way to have some information from a user profile available for public viewing (ie to allow 'guest' viewing rights to some information)?