-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Looks like this is really a configuration issue with the server as the .htaccess is only needed for subpages, but the homepage should work without it. You don't need to change anything in the database as the whole cms uses relative urls. For further debugging, please have a look at the apache logs or maybe the processwire logs(site/assets/logs/).
-
Using MapMarker data for Google Maps Store-Locator.js?
LostKobrakai replied to reed's topic in General Support
You've essentially two options. Either use a dedicated page to generate a json or csv output, which you can call from your javascript. Or you can just output the data as json directly to the page you're using the Store Locator on, like this: echo "<script type='text/javascript'>var storelocator_data=".json_encode($yourData).";</script>" -
Change name of the 'site' folder?
LostKobrakai replied to modifiedcontent's topic in Getting Started
One can do this, but it requires some manual setup and maintenance. As long as there's not a major reason to go that way it's just easier to go with independent installations.- 6 replies
-
- site folder
- site
-
(and 2 more)
Tagged with:
-
ProcessWire won't work without a .htaccess, so renaming it back to .txt won't solve anything. What rewrite base do you use on the subfolder? Normally it should be like this: # Subfolder RewriteBase /v2/ # Root RewriteBase / # or even no RewriteBase
-
For a rather small community (at least compared to the big cms players) it's best to keep things in english, so everyone can give input as well as benefit from answers given.
-
Change name of the 'site' folder?
LostKobrakai replied to modifiedcontent's topic in Getting Started
While you can do this it's not recommended, as some parts of ProcessWire depend on this name, e.g. some rewrite rules in the .htaccess. Also I don't see why you would rename your /site folder to your website's name, as really the whole folder, which holds /site, /wire, index.php and .htaccess, is your website. If someone is likely to delete a "site" folder, than it's also likely that this person could delete the "wire" folder, both are not desirable results.- 6 replies
-
- site folder
- site
-
(and 2 more)
Tagged with:
-
ProcessWire Module Generator
LostKobrakai replied to Nico Knoll's topic in Module/Plugin Development
A nice addition for the external config would be if one could choose the inputfield, which you're including automatically for the getDefault() values. -
Languages are defined in a per installation basis (name and label are free to choose), therefore you cannot set your module automatically to the users language. The only fixed language is the default one, which could also be translated to something other than english. The only option you have is providing the translation .json files, so the users can install them by themselves (or automating this step with asking for the languages in which certain translations should be put). Also please look in the forums before asking, there where certainly other threads about handling module translations before.
-
$puffColor = $article->$puff_color->title; // Needs to be $puffColor = $article->puff_color->title;
-
Your selector is wrong "name=$name" would be parsed to "name=directly-off-root.html", but your page's name is still only "directly-off-root" without the html. As you're not using not html'ed names I would suggest just adding it to the name of the pages directly. Your hook to Page::path just changes to url on runtime, but does not modify the "name" field your selector checks for. To keep your code clean it's also best to not couple two different things, appending ".html" and masking out a parent page, into a single hook. Then you'll see that Page::path isn't the right place to handle your first issue.
-
Sort images in an images field by date modified
LostKobrakai replied to Alex's topic in Getting Started
http://cheatsheet.processwire.com/pagearray-wirearray/sorting-and-filtering/a-sort-property/ -
Make a second module, which is autoload, let it install by the fieldtype module. Add the hook to Page::render and check the current page for a map field. If so, call the module which generates your markup and inject it. The markup generation only needs to be able to run independent of other functions, but rather just from the field context the page object provides to the autoload module.
- 14 replies
-
- 1
-
- hook
- non autoload
-
(and 1 more)
Tagged with:
-
Ok, in this case as you're module is already running when you attach the hook it should be working without making it autoload. In this case I also don't see, why the hook won't work.
- 14 replies
-
- hook
- non autoload
-
(and 1 more)
Tagged with:
-
To be able to hook a function if it's called your module must be present, therefore it needs to be autoloaded. The hooked module does't. Just to be sure, did you add the necessary "___" before the hooked function? Without those the function is not hookable. Also is it intended, that your function exit()s before anything gets done?
- 14 replies
-
- hook
- non autoload
-
(and 1 more)
Tagged with:
-
There are basically two ways of making a page accessible under a different url. Either you use urlSegements and a dedicated template, which then renders the page instead of own content. // render another page in a tamplate $pages->get("/services/some-service")->render(); The other option is hooking Page::path to modify the path on the fly. You can see an example here: https://gist.github.com/LostKobrakai/9c02484a9710e16bc512 Also this isn't a new issue, see here: https://processwire.com/talk/topic/9692-hidemask-a-parent-page-from-front-end/
-
Sorry to say that, but I don't think there will be much support for this version of processwire. This dev version is already half a year old, so please do try to first upgrade your installation. Most likely it's already fixed.
-
Edit: Should have read completely before posting, but I can say, that probably your hook is wrong. CKEditor is using a iframe for it's content, so there shouldn't be a inputfield present.
-
ProcessWire Module Generator
LostKobrakai replied to Nico Knoll's topic in Module/Plugin Development
I think it's not intended, that I can already choose 2.5.28 as required version. Edit: And there are some issues with quotes in the module's info.json -
ProcessWire Module Generator
LostKobrakai replied to Nico Knoll's topic in Module/Plugin Development
Yeah, the example should probably be adjusted to not lure people to think it's needed for process pages. -
ProcessWire Module Generator
LostKobrakai replied to Nico Knoll's topic in Module/Plugin Development
@Soma The headline talks specifically about "non-process" modules. The page config option is already used for Process modules. But sometimes a module needs a page e. g. for storing some files and for such things you still need to generate the page manually. -
Getting user permissions to use as selector value in $page->find()
LostKobrakai replied to felic's topic in General Support
Sorry for the unelaborated answer, but have a look here at the $user / $roles and $permission parts: http://cheatsheet.processwire.com/ Edit: Do activate advanced mode to see all methods/properties. -
Welcome to the forums, mattcohen. I'll keep it as short as diogo, but I hope it helps. I don't really see, why you're worried about the search results. WP_Query is kinda link ProcessWire's $pages->find() and the the looping is done by a foreach loop instead of has_posts()/the_post() combo. It's really not that different, but ProcessWire does not rely on any post specific functions to call in content. You've the whole power php gives you to sort / show / manipulate your search results. Also the combination of the selectors, which are used for $pages->find(), and custom templates is really powerful.
-
Modules: Module ProcessPageEditImageSelect failed init
LostKobrakai replied to jeve's topic in General Support
Then we'll need some more information. Is this a image saved on the same page as the textarea you're editing is on? Which ProcessWire version are you using? Do you have any image related modules installed? Can you give a slightly more detailed explanation how you're getting to that error?- 6 replies
-
- modules
- ImageSelect
-
(and 1 more)
Tagged with: