-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
Modules Manager can't handle LanguagePacks, it just lists them but you can't install them. Maybe in future we could support that too. But I'm fearing too much work would be put into for something that may change to the better at some point. I'm also not very satisfied with current system of translation and versions etc of modules. I think there would be much better ways to manage, install, update etc with a more sophisticated system some sort of. Remember Modules Manager is still "alpha" proof of concept type module, doing the work for you downloading and putting manually things in place.
- 19 replies
-
- multi-language
- i18n
-
(and 1 more)
Tagged with:
-
Looks nicely put together, thanks! Make sure once its ready, to put it on modules.processwire.com. Small notice: $this->db->query($sql); Will be deprecated at some point in near future. $this->database is the new one that uses PDO in PW now.
-
Exclude pages from find if there's no template file.
Soma replied to Martijn Geerts's topic in Wishlist & Roadmap
This viewable check is something done on runtime and not on db level. Here an example to do what you want: $excl_tpls = "template!="; foreach($templates as $tpl){ if($tpl->filenameExists()) continue; $excl_tpls .= "$tpl->name|"; } $excl_tpls = rtrim($excl_tpls,"|"); foreach($pages->find("parent=1, $excl_tpls") as $p){ $content .= "<p>{$p->title}</p>"; } -
I just voted for ProcessWire! Help get @processwire packaged by Bitnami. You can vote at http://t.co/5g6Tgsj5YK
-
Exclude pages from find if there's no template file.
Soma replied to Martijn Geerts's topic in Wishlist & Roadmap
What I mean is you can render data of a page even if it has no template file. And what is wrong with excluding them by its template? Or in the find or when doing a foreach? What "obviously" doesn't work for other situations? if(!$p->viewable()) continue or simply by using template access "make" it not viewable? or by making them hidden in the tree? Then you could do a find and don't have them included. -
No just a example. Of course a module to create csv would be possible and cool, but some work required to make it flexible.
-
Too simple to be a module, consider a script like this: $array = $pages->find("template=basic-page")->explode(function($item){ return array( 'id'=> $item->id, 'title' => $item->title ); }); $fp = fopen('file.csv', 'w'); foreach ($array as $fields) fputcsv($fp, $fields); fclose($fp); Note, $pagearray->explode() used here is only available in 2.4 (2.3 dev) http://cheatsheet.processwire.com/pagearray-wirearray/getting-items/a-explode/ And the anonymous functions requires php >= 5.3 http://php.net/manual/de/functions.anonymous.php
- 25 replies
-
- 16
-
-
Exclude pages from find if there's no template file.
Soma replied to Martijn Geerts's topic in Wishlist & Roadmap
A page with a template that has no template file doesn't implicate it's not visible. Maybe it's rendered via urlSegments etc. Or what do you mean with invisible? If it shouldn't be found you would make them hidden or don't give access via template access settings, then it won't be found. -
Exclude pages from find if there's no template file.
Soma replied to Martijn Geerts's topic in Wishlist & Roadmap
I don't think that's really possible with a db query and would if added add overhead. What if you just specify templates in the selector you know have a template file? -
New tutorial: Create simple helper module to output @fontawesome icon markup in templates http://t.co/DsZZTDcBWj #ProcessWire
-
I think you would also want to make sure the module is really loaded. If you tinkered with the autoload => true at some point you would have to reinstall the module. You could also make sure with in template if(!$modules->isInstalled("FrontendUserProfile")){ echo "is not installed"; } $modules->get("FrontendUserProfile"); // now it would be loaded Edit: Something I noticed is that strange ugly $GLOBALS you use $GLOBALS['baseUrl']."/site/templates/styles/images/loginPic.png you could just use wire("config")->urls->templates . "styles/images/loginPic.png"; which will always return correct url. But then I don't understand what your baseUrl should be good for, as you use it also for a redirect.. ? I guess you have pw installed in a subdirectory? But pw urls methods will already include that.
-
I really wonder why this would work locally cause the hooks you have are wrong and can't work: $this->addHookAfter('Page::renderLoginForm', $this, 'renderLoginForm'); should be $this->addHook('Page::renderLoginForm', $this, 'renderLoginForm'); Edit: Strange as it seems to work with both for me on different installs. Seems it doesn't matter if addHook or addHookAfter, but I thought there were some case where I remember it would throw an error. What PW version do you have on both?
-
Just wrote a new tutorial! Instead of writing it down here I did it on my recently created new blog. http://soma.urlich.ch/posts/create-a-helper-module-for-processwire/
- 4 replies
-
- 10
-
-
I think it would be good thing to add domain to html title in admin default theme. I added a long time ago to my admin theme. Instead of Pages • ProcessWire make it mydomain.com • Pages • ProcessWire or Pages • ProcessWire • mydomain.com This would help a lot with seeing in windows list and bookmarks, what site it is from. I can't stand seeing my co-worker looking for the correct window for hours Thanks
-
If there's no error in PW error log then you might find one on the apache server error log. Internal Server Error mostly has to do with some other error might nothing to do with PW. Also I think you can't de-install something you shouldn't. Might aswell could be htaccess. What if you remove htaccess? Any difference?
-
So you don't need LanguageSupport at all? Removing the language pack means? You deleted the json files on on the default language, or you removed languages at all? So you don't need LanguageSupportPageNames? If you don't need LanguageSupportPageNames you could try deinstall it from API In the root where index.php is create a new php script for example tool.php with this: <?php include("index.php"); wire("modules")->LanguageSupportPageNames->uninstall(); echo "Uninstalled LanguageSupportPageNames";
-
'data' is coming and is set from base Fieldtype schema. So reusing/overwriting it.
-
Double click the trash icon. Voila.