-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
ProcessWire Site Header and Footer Used in WordPress Blog
adrian replied to quickjeff's topic in API & Templates
Once the blog posts are imported, they will run just like other PW pages. The import itself is the only potentially tricky part. MigratorWordpress is configurable to match the names of the pages/templates/fields of kogondo's blog module, but if that isn't installed, then it will create all those pages/templates/fields itself. It will even import and create the users from the WP blog and assign the posts to the appropriate user. Once again, just test on a test PW site first so you learn all the options and make sure they are no conflicts / issues.- 25 replies
-
- 1
-
- caching
- header include
-
(and 1 more)
Tagged with:
-
Quick response: For changing the user of a page try: $p->created_users_id = $authorID; $p->save(array('quiet' => true)); If you also want to set the modified user you may need to use some SQL, although I think quiet save works for this also in newer dev versions of PW: $sql = "UPDATE `pages` SET `modified_users_id` = '".$authorID;."' WHERE `id` = '".$p->id."';"; $update = wire('db')->query($sql); Keep in mind that if you find you need to use the SQL approach, it will need to be executed after the last saving of the page or it will be overwritten.
-
Tutorial in German, with videos: http://frankmaier.net/tutorials/processwire/ Migration to PW Article: http://www.jubatian.com/articles/migrating-to-processwire/
-
Or do what I do - don't even both with the actual search functionality - just do a CTRL or CMD + F and type: ->of and let the browser find the text on the page.
-
ProcessWire Site Header and Footer Used in WordPress Blog
adrian replied to quickjeff's topic in API & Templates
That's exactly what it is designed to do - if you import into a dedicated "blog" child page, all posts will be added to this tree without affecting anything else. I would caution you to do the import on a test PW installation first to make sure you understand all the import options and make sure there are no issues before doing on your actual dev site.- 25 replies
-
- caching
- header include
-
(and 1 more)
Tagged with:
-
ProcessWire Site Header and Footer Used in WordPress Blog
adrian replied to quickjeff's topic in API & Templates
https://github.com/NicoKnoll/MigratorWordpress I have used it successfully on two new sites and I know Septhiroth has also used it!- 25 replies
-
- caching
- header include
-
(and 1 more)
Tagged with:
-
@valan - thank you for helping to figure this out. I added your is_object check and also fixed the issue with the Delete tab not being hidden. Could you please try the new version and let me know if everything is working as expected?
-
It is an alias for setOutputFormatting and it is directly under this one on cheatsheet http://cheatsheet.processwire.com/?filter=$page-%3Eof(true|false)
-
Yep, 0,1,2,3 has nothing to do with the frame the image is taken from, they are just "names" for certain thumbnails. Here is a good thread detailing all the available images: http://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api Actually on that note, I see that I am missing "sddefault", so I will add that now.
-
Hi Peter, Glad you are liking the module. I haven't looked at this for a while, but at the time I built this it seemed like all the options were not always available with all videos which I why I built in the "First Available" option - that way you can list all, but only grab one. Would your needs be suited by reordering the list so that "default" was listed first? That way if it is available, it will grab that one, saving you the bandwidth of downloading the maxresdefault if you don't really need it.
-
Site says: "Unable to complete this request due to an error"
adrian replied to nikoka's topic in General Support
I am not sure what version of PW you were running before, but the current stable requires PHP version 5.3.8 or newer with PDO database support. That error is saying that you don't have PDO support. So you will need to correct that (your host should be able to deal with that for you), or you will need to revert to an older version of PW that worked with mysqli. Best of luck sorting it out. -
Sorry, I didn't read properly. I am still not exactly sure the scenario you have, but if I understand correctly, it is easy to get all the comments for a series of pages like this, without needing to hack core code: $selectedPages = $pages->find("id=4287|4304|4307|4314"); foreach($selectedPages as $p) { foreach($p->comments as $c) echo $c->text; } Maybe that isn't exactly what you need, but maybe it will be helpful. If not, can you explain a little more about how and where you want to output the comments.
-
Try id instead of pages_id
-
I assume this was directed at me, and not @arjen? I am trying to replicate your issue here but can't at the moment. Just quickly, I am wondering if that might be a bug in InputfieldWrapper.php Could you please try to replace that line 245: } if($this->getChildByName($item->attr('name')) && $item->parent) { with: } elseif($this->getChildByName($item->attr('name')) && $item->parent) { I am not sure this is the problem, but it's weird to me the styling Ryan has with the "if" starting on the same line as the closing curly brace, so I think it might be meant to be an "elseif". Anyway, let me know if that fixes things - if not can you narrow down a particular setup that results in the new error.
-
I don't know what's going on with the extra output, but you have issues with your page saving. You should be doing: $nr->save() or $p->save(), not $page->save() I guess your first example will probably work as is, but the second one won't save the new page you have created - it will be save the current page that is being viewed, which is always $page.
-
Simply add start=0 to the selector in your other queries.
-
Would anyone else like to see the ability to make use of PW variables to build up dynamic descriptions and notes for fields? This is a very simplistic example and not that useful, but I do have some use cases where the ability to do something like this would be very handy: $f->description = __('Please make sure you fill out this field based on the content of the {page.parent.title} summary field.'); As I said - a bad example, but I think this could be a powerful addition in some scenarios.
-
Temporarily lock out all from admin except superusers
adrian replied to Lars282's topic in General Support
Keep in mind that the maintenance mode and protected mode modules only limit access to the front-end of the site, not the admin panel, so won't work for your needs anyway. -
Good point - I hadn't noticed this before as I guess I have never entered a relative URL in a FieldtypeURL field before. I guess the difference for me is that in an RTE field you always need to insert a URL, but in the case of a field that is just storing a link to a page, it might be better to store the page ID - I think if you do go this route, you want to store the ID, but always return the page object so in the template you could choose ->url, ->id, ->title, etc I think that looks much cleaner!
-
"pro" Support if agency license - multiple users possible?
adrian replied to Webrocker's topic in General Support
I would suggest PM'ing Ryan about this. -
Temporarily lock out all from admin except superusers
adrian replied to Lars282's topic in General Support
If you are happy with a quick hack, try this in your templates/admin.php file. if($user->isLoggedIn() && !$user->isSuperuser()) { echo 'Sorry, login is temporarily disabled'; return; } -
Hi @wumbo - thanks for this - looks pretty handy, but a few thoughts for you. If you manually enter a URL it automatically adds the http://, forcing it to be an absolute URL, but if you choose a page, it populates a relative URL - this will be problematic when outputting this field's contents in something like an emailable template. When selecting a page from the site, I would rather the field stores the ID of the page, just in case the path (and therefore the URL) is changed down the road. The module could handle outputting the URL of that page automatically, so if an absolute URL is stored, then echo that, otherwise echo the URL of the page, maybe with an option to force an absolute URL just in case you are using this field in something like an email template. I think this would be a very useful addition. Just visual stuff, but I'd like to see the "Open Link Assistant" a little LOT smaller - perhaps a small icon or something. Also, the width of the text input is not quite right. Thanks again!
-
@kixe - does your revised version handle the issue I mentioned here: https://processwire.com/talk/topic/6555-module-currency-conversion-service/?p=74890 EDIT: Nevermind - sorry I see that your module is different It would be nice to have a fix for the double entries issue though.
-
Hi @hyldig and welcome to PW. To upload other file types, make a new field for your template that has type "File". You can control the file extensions that are allowed on the Details tab. EDIT: beaten by @sergio
-
Short answer: Yes Attached is a revised version of the module I posted here: https://processwire.com/talk/topic/8406-set-multiple-templates-role-access/?p=81711 This new version adds support for changing "View" access and includes the Guest role (the original version didn't have these options). I haven't tested all scenarios thoroughly with this new version, but hopefully it works as expected. Once installed, go to Setup > Template Setup Batcher PS Don't forget the SHIFT+Click trick for selecting all 50 templates. ProcessTemplateSetupBatcher.module