Leaderboard
Popular Content
Showing content with the highest reputation on 03/19/2015 in all areas
-
If you are using the great PagePathHistory module in core, this one might be helpful: Page Path History Manager https://github.com/boundaryfunctions/PagePathHistoryManager General This modules allows you to easily manage past page URLs tracked with the PagePathHistory module. It extends the settings tab on the page edit form in the backend and allows you to: view past URLs of the current page and parent pages, delete past URLs, and create new fallback URLs. How to use Use the form in the settings tab on the page edit form of every page in admin to view and manipulate past URLs. See Screenshots to get a better idea of what you can do. Installation Install the module PagePathHistory from within the Processwire admin. PagePathHistory is included in core but not installed by default. Grab the module from its Github repository. Install this module from within the Processwire admin or copy the file content to/site/modules/PagePathHistoryManager. In Admin, click Modules → Check for new modules to refresh module directory. Afterwards install the newly registered module PagePathHistoryManager. You can now manage past URLs from within the settings tab when editing any page. Screenshots Notes This module doesn't install or require PagePathHistory because I'm currently working with a fork of it that is language sensitive. I'll try to publish this one here as well, but I'm not done with final testing. Links You can grab this Module from Github: Source Releases Download latest release I would be glad if some of you could give this module a quick test drive and comment with some feedback here.6 points
-
Or use: http://modules.processwire.com/modules/protected-mode/ If you are giving them a user account for the admin anyway, you may as well make use of it for accessing the front-end during development also. Much cleaner for them rather than having to login via the htpasswd entry, and then again for the PW admin panel. If you don't want them to have admin access you can still use this module and give them a guest role only!6 points
-
6 points
-
5 points
-
Otherwise this looks like a valid solution, but editing *anything* in the /wire/ directory is a bad idea. For config settings, see /site/config.php. If the setting you're trying to edit only exists in /wire/config.php, copy it to /site/config.php and it'll work just fine.4 points
-
The site linked below is currently live, but it's still very much a WIP. All the responsiveness has been disabled for now until we can get some other issues addressed. I've been reluctant to post anything about it, as it's really not complete. That said, here is another example of a card based layout. http://arts.ufl.edu/in-the-loop/news/ I'll post more about that site over the summer when it's officially live and complete. @adrian, Thanks! Lots more coming soon too. I'm waist deep in phase II.3 points
-
http://assessment.ifas.ufl.edu/assessments/ This is a very simple example from a site I built. No frameworks, just a simple responsive grid. As Macrura said, there really isn't a whole lot to it.3 points
-
Many valid solutions above. Here is another method: Make the site only accessable when logged in to the manager if (!$user->isLoggedin()) die(); Put it somewhere in /site/templates/_init.php or /site/config.php3 points
-
During developement, use... <meta name='robots' content='noindex,follow' /> ...in the future and remove this tag before the Going Live.3 points
-
2 points
-
First in google http://nnattawat.github.io/flip/ Edit: and a bit lower http://pingmin-tech.com/flipcardjs Edit2: and with Masonry http://codepen.io/rmarmer1/pen/bkaAK2 points
-
I know it's off-topic, but I do love what you've done with that site - I've seen it before, but it looks like you've improved on the filter functionality - very clean, visually appealing, and super functional!2 points
-
Just had the problem where I wanted all templates to be served as JSON. This is what I did: /wire/config.php $config->prependTemplateFile = '_init.php'; site/templates/_init.php: <?php header("Content-Type: application/json; charset=utf-8"); ?> and it worked fine. Now if you wanted to, you could simply create a field in Processwire for each page that allows for a custom setting, like: <?php header("Content-Type: " . $page->custom_content_type . "; charset=utf-8"); ?> in your appended file. Works like a charm.2 points
-
And if you want more control, like protecting new areas that are being developed on sites that are already live, you can use: http://modules.processwire.com/modules/page-protector/2 points
-
I can't seem to get it to work, but in a rush and maybe missing something obvious, but soma has this module: https://github.com/somatonic/FieldtypeImagesSelect I think that might do what you guys are looking for.2 points
-
Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo. Cras justo odio, dapibus ac facilisis in, egestas eget quam. {video} Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. $search = '{video}'; $replace = "<iframe width='560' height='315' src='$page->your_field' frameborder='0' allowfullscreen></iframe>"; str_replace($search, $replace, $page->body);2 points
-
I'm on mobile, but robots.txt is the keyword. For your current case I would suggest doing a permanent redirect from the testserver to the production one, so google will at least slowly move over to the real urls.2 points
-
Sorted. I still am not sure how but things are now working correctly. I have only uncommented the RewriteBase / line and apart from that the .htaccess file is unchanged. And all is sweetness and light. Don't ask..... Thank you everybody for your patience and advice.2 points
-
If you're not afraid of pirates, there's also the Table ProField: https://processwire.com/api/modules/profields/table/2 points
-
Hello there Yesterday we at update AG relaunched the new 1815.ch news portal of Mengis Medien AG. It's a big new portal of a local newspapers here in Wallis Switzerland. That's where the Matterhorn is also It was a thrill to work on this project using ProcessWire. We're still working out some details and adding more stuff in future. There's a lot going on and it has quite lot of traffic. 60k+ pages at the moment. Currently it serves 18k+ articles plus a lot of other data that are just pages. But will grow a lot. The portal has currently around 7k+ user registered. Lots of imports and exports are going on in the background. That mostly are XML feeds or data being uploaded to server. Some news are imported and automated. While they have different teams creating articles apart from the imports of their newspaper also via XML. http://www.1815.ch1 point
-
Build my first PW website...., and not my last. Like PW a lot. It is fun to work with and sometimes a challenge. Spent, more than once, some ours fiddling on code issues, but real proud when I got it to work. Could not have done it without the feedback of the members from this community, thank you! Modules I used: -Email Obfuscation -Form Builder -SEO -Blog -Google Analytics -Protected Mode -Wire Mail SMTP Other: -Bootstrap -Animate -WOW -Unslider Website: http://www.tweemansterk.nl1 point
-
1 point
-
Thanks for making this, great idea that comes in handy. Just for code: At a first glance at the code, why does it have to be a Process module that is autoload? Not sure but I think implement Module isn't necessary as Process class already has that? Instead of this: public function install() { parent::___install(); /* Create manager page */ if (!count($this->pages->find('name=' . __CLASS__))) { $p = new Page(); $p->template = $this->templates->get('admin'); $p->title = 'Page Path History Manager'; $p->name = __CLASS__; $p->parent = $this->pages->get(3); // Create as children of /admin/pages $p->status = Page::statusHidden | Page::statusSystem; // Hide in menu and prevent deletion $p->process = $this; $p->save(); } } You can also do now public static function getModuleInfo() { return array( 'title' => '', 'page' => array( // optionally install/uninstall a page for this process automatically 'name' => 'page-name', // name of page to create 'parent' => 'setup', // parent name (under admin) or omit or blank to assume admin root 'title' => 'Title', // title of page, or omit to use the title already specified above ) ), ...1 point
-
Net magazine is doing a CMS poll. Seems like you can vote multiple times which could make the poll a bit misleading. https://docs.google.com/forms/d/1QH9axSE7sS1B56KSxzVVzwE9Hg0gPiSNSvMy_ZFqRMM/viewform https://twitter.com/netmag/status/5785948525244170241 point
-
Yeah, preferably you would load that additional content via ajax. Otherwise you are loading lots of hidden content that may never get seen.1 point
-
adrianmak: to start an animation when scrolling you can use WOW http://mynameismatthieu.com/WOW/1 point
-
there's really nothing to it... you just need a way of rendering the objects, like a function or include file, or template render; I have a site that i do an isotope 'wall' homepage, and it pulls in all of the site content, and renders each wall item with a different function depending on the template of the page.. the isotope/masonry is pretty well documented and easy to use, if you're planning on using that;1 point
-
i don't get this: $menuname = $page->show_menu->select_value; if you want the name then it would be: $menuname = $page->show_menu->name; you could also setup a fallback in case you haven't made show_menu required, like: $menuname = $page->show_menu->name ?: "home-menu"; oops - almost forgot: welcome to the forums, and to processwire!1 point
-
That certainly works, but is not very friendly as you can't send them a link directly to a subpage. You could redirect them to the admin automatically, but then they still have to get back to the page they were looking for, so you'd need to redirect from login success back to that page. Hence the reason I created Protected Mode1 point
-
1 point
-
But that doesn't help much with inline Videos which are put somewhere, whereever in whatever textarea? Unless in combination with Hanna Code ... ! Btw. I made this module to be able to adjust some youtube embed options (my very first module btw.) ... https://github.com/blynx/TextformatterVideoEmbedOptions Not super useful - but for now it works in my project. I am thinking about how to make this thing actually useful considering real use cases. edit: I already found some stupid elementary glitches in my module I will fix soon. And also as an reply to below: But what about many different videos pasted into one single articel‽ : )1 point
-
It's a PW variable and yes you can use it in your templates/modules if you need to do a direct SQL query. There's not that much on it, but a few posts that might give you some background/info: https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=36787 https://processwire.com/talk/topic/1918-mix-api-with-standard-query/ https://processwire.com/about/news/introducing-processwire-2.4/1 point
-
/wire/core/Database.php This is pretty high level stuff that you won't find in the (current) API documentation which (the documentation) is aimed at everyday PW use rather than module dev.... The class Database is available everywhere...1 point
-
1 point
-
Hi johannes and welcome! If you only need to store key-value pairs, ProcessWire often uses a simple textarea where each line corresponds to a key/value pair. In your code, you can get the keys/values by using PHP's explode function (newline as a delimiter). Another possibility would be to dynamically create a new input field when clicking a button, but this requires some javascript to work. I don't think that you can use an existing inputfield, but I might be wrong1 point
-
Thank you very much for those links, will investigate (+ also look at searching better!)1 point
-
The only thing which really depends on the server configuration is the RewriteBase. This is dependent on how php and the document roots are set up on the server. It does otherwise not matter to processwire in which folder it is or under which domain it's called.1 point
-
That's the case for the backend which ships with ProcessWire. The frontend is always custom and therefore there are no limitations in browser compatibility, but it depends on what the dev does build for you.1 point
-
It seems like you would need to change the rewrite base in the .htaccess. That's the most obvious thing that would cause this behavoir.1 point
-
Another thing to your entry post, please use the code boxes for code. foreach($myPages as $p) { $p->set("your_new_field", $p->field.$p->anotherfield); //Field is runtime only } Maybe this works. You'd need to fill the field for each page. Even if it's different contentwise.1 point
-
Issue was fixed by Ryan. $options = $fieldtypes->get('FieldtypeOptions')->getOptions('YOURFIELDNAME'); foreach($options as $option) { echo $option->id; echo $option->value; echo $option->title; } This output all your options (id, value or title). This piece of code doesnt work multilingual. It only outputs the default language. If you have a multilingual site you have to output value and title in the specific language. //get value and title in different languages; if ($user->language->name != 'default') { $title = "title{$user->language}"; $value = "value{$user->language}"; } else { $title = 'title'; $value = 'value'; } $options = $fieldtypes->get('FieldtypeOptions')->getOptions('YOURFIELDNAME'); foreach($options as $option) { echo $option->id; echo $option->$value; echo $option->$title; }; Hope this is useful for others!1 point
-
Getting the different values is easy for the pagefields, as you know all the possible values (the pages). $formats = $pages->find("template=format"); foreach($formats as $format){ $num = $pages->count("template=video, format={$format->id}"); // Count all videos where format is $format if($num) echo $num; } For the other informations I'd suggest going the same way. E.g. for clip length: Add pages to your tree for the different clip length options (5-10, 10-15, …; you don't need the exact values for the count). Add a pagefield to the video's template: "clip_length_option" Use a hook to update this field on page save (example) dependent on the field that holds the real length of a clip. Use mysql to update existing video entries with the new field data (i think that's the fastest way as you're already using mysql). Hope this helps.1 point
-
Well the SQL command for basic replaces of the "body" field would go something like this: UPDATE field_body SET data = REPLACE( data, 'search_word','replacement_word' ) The key thing for me when using the PW API is to limit it to just the fields and pages with matching results, rather than iterating and saving every field on every page on the site.1 point
-
1 point
-
Unless you can point to some agreed/standard web terminology, content type seems mainly to be a Drupal concept (OK, so there's also SharePoint but that's another story). It's just one way of organising and 'naming' content. MODx has resources, Drupal has nodes/content types (of which a 'basic page' is but one type), here we mainly organise our content using 'pages'. There's no right or wrong way....that's just the way it is. But we do like our 'pages'1 point
-
I think you are misunderstanding how ProcessWire works. The reason Drupal has content types is because they welded a CCK on top of the system as an after thought. ProcessWire has no such restrictions. You create dedicated templates for everything. You want a review page? You create a template for it. You want an event page? Create a different template - and so on and so forth. In fact, you HAVE to do that - the blank install has nothing in it. It is a blank sheet of paper for you to play with. Systems like Joomla and Wordpress are not really Content Management Systems - they are Article Management Systems which have to be bent to work with different types of content. ProcessWire is a true content management system in that is manages any kind of content that you want to create. Pages, as I said before, are whatever you want them to be. They are not a limited thing like the mainstream Drumlapress. They are just what you create from whatever template you design.1 point
-
Don't call it pages, call it content type. While ProcessWire is using the name or label "Pages", it can be basically everything. A user is a page, the whole admin area consist just of pages and you could create your own content types. What you mentioned is basically there. Use templates for your content types, link them with the Page (PageSelect) field and then you can cross-access values in the tempalte files. Quick Example: Create a template for product, add the needed fields. Create "Products" by creating new pages with that template. Now create a field with of the "Page" type and call it product. This allows you to link pages. Set it to "Single item" and add it to your desired "Page"-Template. Now you can select your product on the other "Page" and access it via API with $page->product->title1 point
-
I understand and know this, but why do you need to get the translation when it is just already there. It will output in the language the user views the page ($user->language) This works just fine in the language the user view the page. echo $fields->get("body")->label; Edit: ah, hm it does not? Ok it doesn't get translated as with page fields. Since it's meant to be used for backend context there's no language value for fields settings. So you either use a $lang variable like this: $lang = $user->language->isDefault() ? "" : $user->language->id; // Default needs no id echo $fields->get("body")->get("label$lang"); Or a little hook to add method to the $fields template API var. // from template or a autoload module $fields->addHook("getLabel", null, "getLabelLang"); function getLabelLang($event){ $field = $event->arguments(0); $lang = wire("user")->language->isDefault() ? "" : wire("user")->language->id; $event->return = wire("fields")->get($field)->get("label$lang"); } // now we use it and it will recognize user lang echo $fields->getLabel("body");1 point
-
You can modify the titles of the items before sending them to $rss->render: <?php // retrieve the RSS module $rss = $modules->get("MarkupRSS"); // configure the feed. see the actual module file for more optional config options. $rss->title = "Latest updates"; $rss->description = "The most recent pages updated on my site"; // find the pages you want to appear in the feed. // this can be any group of pages returned by $pages->find() or $page->children(), etc. $items = $pages->find("limit=10, sort=-modified"); // add something to the item titles foreach($items as $item) { $item->title = $item->title . " my text"; } // send the output of the RSS feed, and you are done $rss->render($items);1 point