Leaderboard
Popular Content
Showing content with the highest reputation on 07/23/2013 in all areas
-
...my first project built with processwire: www.starsabalestrino.it Starsabalestrino is a major cultural event in Balestrino (small city in Liguria), focusing on contemporary theater. I'd like to thank Ryan for his "flexible" cms and all the friendly community ready to answer my silly questions.10 points
-
CollagePlus is a jQuery plugin by Ed Lea. It takes a list of images and converts it to a nicely formatted grid. With this module, we use the CollagePlus plugin to produce nice grid output for ProcessWire image selection. This applies to the images that you select when clicking the image icon from the rich text editor (TinyMCE or CKEditor). The idea for this is from the great Unify admin theme for ProcessWire by @adamspruijt. To use, simply install the module and it is ready to go. Requirements: This module should run on any version of ProcessWire. But to be on the safe side, it would be best to use version 2.2 or newer. If you are using version 2.3.1 (dev branch) or newer this module makes use of conditional autoload for increased efficiency. Download: http://mods.pw/54 or https://github.com/ryancramerdesign/JqueryCollagePlus or install via Soma's ModulesManager. For those running ProcessWire 2.3.2 or newer, you can also install it from your admin: Modules > new > class: JqueryCollagePlus.9 points
-
Guest means that no user is specifically logged in. But for things like your own bootstrapped scripts or other API usage, you can create a user specific to that need. Then in instances where you want them to be the current user (rather than guest) you can do a call like this: $u = wire('user'); // save current user, if you want to $users->setCurrentUser($users->get('api')); // set new user: api // // .. your code that does stuff // $users->setCurrentUser($u); // set back to the previous user, if you want to7 points
-
This won't help much with your current issue, but I've just pushed new version of this module to GitHub. This version adds an option to log which script triggered (ie. initiated) each action; a path or an URL, depending whether context was HTTP or non-HTTP. This feature can be enabled via settings of Process Changelog Hooks module to either external scripts only or both external and local scripts (ie. current PW installation called in "normal way" -- bootstrap method is considered "external.") Haven't been able to test it thoroughly enough yet, but so far it seems to work. If anyone has time to test this, I'd love to get some feedback.5 points
-
I have hacked this module together which seems to work pretty well. It wraps the image in a div and grabs the caption from main description field within the images field. I think this is what you were looking for. This is all done with PHP, rather than JS. Probably not a very elegant approach, but I needed something quickly. After some feedback, I would like to add some config options for formatting of the caption and whether you want the caption from the images->description field (as it currently is), or simply the one that becomes the ALT tag in the RTE textarea. Also, the module should perhaps named as a textformatter? Any thoughts? EDIT: I just replaced the attachment with v1.01 which now handles pages that include textareas with embedded images from other pages in the tree. One concern with this is that if an image with the same filename exists anywhere else on the site, it won't know which one to use. Not sure how to get around this yet. EDIT: 1.02 makes sure there is appropriate content on the page to prevent warning error. EDIT: 1.03 makes use of some code from Martijn's Image Interceptor to grab the id of the page the image is from, to deal with the potential duplicate filename issue. Available at: https://github.com/adrianbj/ImageTextCaption4 points
-
Hello all, So I've been asking way too many stupid questions on forum to turn an idea into reality. I've finally launched a basic version of the drama booking website. Still many important things like Payment & sms gateway are remaining but that too will be added soon. Allow me to present you Ticketees.com (Credits: http://ticketees.com/humans.txt) It's been out & being tested and used by drama producers for almost a week now. We've got some very positive response. It wouldn't have been possible if I hadn't learnt so much from Ryan & ProcessWire's community and ofcourse, ProcessWire itself. I've very very thankful to each & everyone who made it possible. There's a long way to go, many many things are left to be done. I'd like you all to see and give me your honest feedback, good or bad, help me improve it. Thank you all once again.3 points
-
@adrian: I must admit that your approach is unique, to say the least. I've never really seen domdocument in action, so this is quite fascinating For a slightly different approach I've just pushed an old textformatter module I never ended up using or completely finishing (JS approach felt better after all) to GitHub: https://github.com/teppokoivula/TextformatterImageWrapper. This was intended just for wrapping images with a div element to enable more flexible styling, but also has an option for appending the description within said wrapper (which seems to be the topic of discussion here.) It's very much a work in progress / beta / proof of concept, but should be fully functional already3 points
-
@cstevensjr I get what you are saying about different situations but of course you can still search for hidden and unpublished items by using "include=hidden" or "include=all" in your selectors. You can also use $pages->get to get one page, hidden or not. . I suppose it's about using what best suits the situation.. @Horst - the above code was definitely not a waste of time!2 points
-
Also, don't forget about the "hidden" checkbox on every page's "settings" menu. That by itself would enable you to hide items from the Foundation menu. This is the method that is used natively in the profile to hide things like the search page from appearing in the menu.2 points
-
Thanks so much guys - you rule! Will get on it in the coming weeks and let you know how I fare!2 points
-
Put it on Githhub again..https://github.com/SiNNuT/countries/ Not actively maintained, but i don't think there were a lot of new countries the last year.2 points
-
Just add something like this to the top of your events index page. You could compartmentalize this into a LazyCron call, but for such a simple thing it's really not necessary. $events = $pages->find('parent=/events/, date<"-3 months"'); foreach($events as $event) { $event->of(false); $event->addStatus(Page::statusUnpublished); $event->save(); } Btw, when testing something out like this, always comment out the $event->save(); the first time and take a look at what pages get affected by echoing them rather than saving them, the first time around. i.e. // $event->save(); echo "<p>Unpublishing: $event->url</p>"; Once confirmed that it is behaving the way you want, then remove the echo and uncomment your save();2 points
-
Since you guys asked for it, I'll take a stab at a case study on the development process. Most of the development was done in about a week and a half. I started with the basic profile, but it ended up being something somewhat similar to the Blog profile in terms of how it's structured. Below I'll cover some details on the biggest parts of the project, which included data conversion, the template structure, the front-end development and anything else I can think of. Data Conversion from WordPress to ProcessWire One of the larger parts of the project was converting all of the data over from WordPress to ProcessWire. I wrote a conversion script so that we could re-import as many times as needed since new stories get added to cmscritic.com almost daily. In order to get the data out of WordPress, I queried the WordPress database directly (my local copy of it anyway) to extract what we needed from the tables wp_posts for the blog posts and pages, and then wp_terms, wp_term_relationships, and wp_term_taxonomy for the topics and tags. WordPress stores its TinyMCE text in a state that is something in between text and HTML, with the most obvious thing being that there are no <p> tags present in the wp_posts database. Rather than trying to figure out the full methodology behind that, I just included WP's wp-formatting.php file and ran the wpautop() function on the body text before inserting into ProcessWire. I know a lot of people have bad things to say about WordPress's architecture, but I must admit that the fact that I can just include a single file from WordPress's core without worrying about any other dependencies was a nice situation, at least in this case. In order to keep track of the WordPress pages imported into ProcessWire through repeat imports, I kept a "wpid" field in ProcessWire. That just held the WordPress post ID from the wp_posts table. That way, when importing, I could very easily tell if we needed to create a new page or modify an existing one. Another factor that had to be considered during import was that the site used a lot of "Hana code", which looked like [hana-code-insert name="something" /]. I solved this by making our own version of the Hanna code module, which was posted earlier this week. Here's an abbreviated look at how to import posts from WordPress to ProcessWire: $wpdb = new PDO("mysql:dbname=wp_cmscritic;host=localhost", "root", "root", array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'")); $posts = wire('pages')->get('/posts/'); $sql = " SELECT * FROM wp_posts WHERE post_type='post' AND post_status='publish' ORDER BY post_date "; $query = $wpdb->prepare($sql); $query->execute(); while($row = $query->fetch(PDO::FETCH_ASSOC)) { $post = $posts->child("wpid=$row[ID]"); // do we already have this post? if(!$post->id) { // create a new post $post = new Page(); $post->template = 'post'; $post->parent = $posts; echo "Creating new post...\n"; } $post->of(false); $post->name = wire('sanitizer')->pageName($row['post_name']); $post->title = $row['post_title']; $post->date = $row['post_date']; $post->summary = $row['post_excerpt']; $post->wpid = $row['ID']; // assign the bodycopy after adding <p> tags // the wpautop() function is from WordPress /wp-includes/wp-formatting.php $post->body = wpautop($row['post_content']); $post->save(); echo "Saved post: $post->path\n"; } What I've left out here is the importing of images, topics, tags, and setting the correct authors for each post. If anyone is interested, I'll be happy to go more in depth on that, but didn't want to overwhelm this message with code. Template File Structure This site makes use of the $config->prependTemplateFile to automatically include the file _init.php before rendering a template file, and $config->appendTemplateFile to automatically include the file _main.php after. So the /site/config.php has this: $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; You may recognize this as being the same setup from the Skyscrapers profile. The _init.php includes files containing functions we want to be available to all of our templates, and set default values for the regions we populate: /site/templates/_init.php /** * Include function and hook definition files * */ require_once("./includes/render.php"); require_once("./includes/hooks.php"); /** * Initialize variables populated by templates that get output in _main.php * */ $browserTitle = $page->get('browser_title|title'); $body = "<h1>" . $page->get('headline|title') . "</h1>" . $page->body; $side = ''; $renderMain = true; // whether to include the _main.php file The includes/render.php file that is included above includes several functions for generating markup of navigation and post summaries, or any other shared markup generation functions. Examples are renderPost(), renderNav(), renderTags(). This is similar to the blog.inc file from the Blog profile except that I'm letting these functions generate and return their own markup rather than splitting them into separate view files. I personally find this easier to maintain even if it's not as MVC. The includes/hooks.php sets up any hooks I want to be present for all of my templates. I could have also done this with an autoload module, but found this to just be a little simpler since my hooks were only needed on the front-end. The main hook of interest is one that makes all posts look like they live off the root "/" level rather than "/posts/" (where they actually live). This was in order to keep consistency with the URLs as they were in WordPress, so that the new site would have all the same URL as the old site, without the need for 301 redirects. /site/templates/includes/hooks.php /** * This hook modifies the default behavior of the Page::path function (and thereby Page::url) * * The primary purpose is to redefine blog posts to be accessed at a URL off the root level * rather than under /posts/ (where they actually live). * */ wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'post') { // ensure that pages with template 'post' live off the root rather than '/posts/' $event->replace = true; $event->return = "/$page->name/"; } }); Our /site/templates/_main.php contains the entire markup for the overall template used site wide, from <html> to </html>. It outputs those variables we defined in _init.php in the right places. For example, $body gets output in the <div id='bodycopy'>, $side gets output in the right <aside>, and $browserTitle gets output in the <title> tag. /site/templates/_main.php <?php if($renderMain): ?> <html> <head> <title><?=$browserTitle?></title> </head> <body> <div id='masthead'> // ... </div> <div id='content'> <div id='bodycopy'><?=$body?></div> <aside id='sidebar'><?=$side?></aside> </div> <footer> // ... </footer> </body> </html> <?php endif; ?> We use the rest of the site's template files to simply populate those $body, $side and $browserTitle variables with the contents of the page. As an example, this is an abbreviated version of the /site/templates/post.php template: /site/templates/post.php // functions from /site/templates/includes/render.php $meta = renderMeta($page); $tags = renderTags($page); $authorBox = renderAuthor($page->createdUser); $comments = renderComments($page); $body = " <article class='post post-full'> <header> <h1>$page->title</h1> $meta </header> $page->body $tags $authorBox $comments </article> "; if(count($page->related)) { $side = "<h4>Related Stories</h4>" . renderNav($page->related); } What might also be of interest is the homepage template, as it handles the other part of routing of post URLs since they are living off the root rather than in /posts/. That means the homepage is what is triggering the render of each post: /site/templates/home.php if(strlen($input->urlSegment2)) { // we only accept 1 URL segment here, so 404 if there are any more throw new Wire404Exception(); } else if(strlen($input->urlSegment1)) { // render the blog post named in urlSegment1 $name = $sanitizer->pageName($input->urlSegment1); $post = $pages->get("/posts/")->child("name=$name"); if($post->id) echo $post->render(); else throw new Wire404Exception(); // tell _main.php not to include itself after this $renderMain = false; } else { // regular homepage output $limit = 7; // number of posts to render per page $posts = $pages->find("parent=/posts/, limit=$limit, sort=-date"); $body = renderPosts($posts); } The rest of the site's template files were handled in the same way. Though most were a little simpler than this. Several were simply blank, since the default values populated in _init.php were all that some needed. Front-end development using Foundation 4 The front-end was developed with the Foundation 4 CSS framework. I started with the Foundation blog template and then tweaked the markup and css till I had something that I thought was workable. Then Mike and I sent the _main.php template file back and forth a few times, tweaking and changing it further. There was no formal design process here. It was kind of a photoshop tennis (but in markup and CSS) where we collaborated on it equally, but all under Mike's direction. After a day or two of collaboration, I think we both felt like we had something that was very good for the reader, even if it didn't originate from a design in Photoshop or some other tool like that. I think it helps a lot that Foundation provides a great starting point and lends itself well to fine tuning it the way you want it. I also felt that the mobile-first methodology worked particularly well here. Comments System using Disqus We converted the comments system over to Disqus while the site was still running WordPress. This was done for a few reasons: Disqus comments provide one of the best experiences for the user, in my opinion. They also are platform agnostic, in that we could convert the whole site from WP to PW and not have to change a thing about the comments… no data conversion or importing necessary. Lastly, ProcessWire's built-in comments system is not quite as powerful as WordPress's yet, so I wanted cmscritic.com to get an upgrade in that area rather than anything else, and Disqus is definitely an upgrade from WP's comments. In order to ensure that Disqus could recognize the relations of comment threads to posts, we again made use of that $page->wpid variable that keeps the original WordPress ID, and also relates to the ID used by the Disqus comments. This is only for posts that originated in WordPress, as new posts use a ProcessWire-specific ID.1 point
-
Hi guys, It's been a while that I've posted here on the forum, the reason was - I got a new job few months ago so I've been rather busy and haven't got time to post some new things. I've made a Yahoo! Weather module that connects to Yahoo weather API and pulls current forecast and forecast for next 4 days. The module is completely ready for translation, I've also made days and weather conditions translatable because Yahoo API doesn't offer localization (English only). The widget has normal mode and compact mode and you can easily customize it's appearance through included CSS. Edit 12.04.2015. This module is not longer supported, check out the new version at this link. I'll fix some errors that are currently in this module for those of you who like the old version better then the newer one. Screenshot Download https://github.com/nvidoni/MarkupWeather How to install Copy module directory to /site/modules/ directory. Click check for new modules in ProcessWire Admin Modules screen. Click *install* for the module labeled: "MarkupWeather". How to use Copy this line to template of your choice where you want the weather widget to be displayed: <?php echo $modules->get('MarkupWeather')->render(); ?> This module has the following options: Yahoo! Weather Woeid Woeid is a number located right beside the city name, e.g. http://weather.yahoo.com/croatia/grad-zagreb/zagreb-851128/ Set Locale sets PHP locale, needed for date display localization Date Format date formatted with PHP strftime function Show 5 day forecast below current weather forecast? turn this off if you want to display compact weather widget, shows only current weather Display temperature in Fahrenheit instead of Celsius? show weather conditions in Celsius or Fahrenheit scale Hope you'll like it.1 point
-
1 point
-
All: If you saw some of my recent postings where I was trying to solve the problem of running a query as a field, I have solved it. I started with Hanna text, but that didn't quite get me all the way. Then I tried just a Concat field, and that didn't get me all the way. I modified the Concat fieldtype for my solution. I had a need to dynamically pull Pages that were cross-referenced back: Product as a Page Photo Pages with a multi-Page Select field that referenced Product (A photo could represent 1+ Products) I wanted a ->photos field from Product that was updated dynamically according to what Photo entries were currently in place, and I didn't want copy/pasted code, and I wanted the selectors to be easily modifiable from the admin screens. Usage is faily simple: 1: Install as a normal module 2: Create a field as a PagesSelectorQuery type 3: On the field details, enter your selector string, ie: template=my_template,select_page_field=$page 4: Add your field to whichever templates. 5: Access the PageArray results like you would any other $page->field I hope you find it useful, at the very least as an exercise in my madness. Thanks again for all the help this community has provided. EDIT: Added to GitHub: https://github.com/alevinetx/processwire-modules/blob/master/FieldtypePagesSelectorQuery.module And Module's page: http://modules.processwire.com/modules/fieldtype-pages-selector-query/ FieldtypePagesSelectorQuery.module1 point
-
Hi all, here it is the site we made for an european project with processwire! http://smartenergyproject.eu The project will continue for 2 years, and maybe will have 3 languages (EN, ITA, DEU), many editors, and maybe a linkedin integration so is a good start point to test all features of processwire! Alessio1 point
-
I know about this module, but i did not test it. For me its not big deal to have more DBs. On localhost i have like 18 now1 point
-
Thanks for all the feedback everyone. There are a few reasons I didn't go with JS (which I have used for several years for making image captions from ALT fields). I wanted to use the Image description field that is with the image in the images field, rather than the one that is added when inserting the image into the RTE (and becomes the ALT tag). This is what Lars asks for in post #3 above, but more importantly, this has the advantage of keeping the ALT for its intended purpose which is to describe the contents of an image for screen-readers/search engines - eg. "clothes on a clothesline". This allows the image caption to be more relevant to the context of the image in the text. eg. "Hanging your laundry outside saves energy, money, and the environment." I also wanted to be able to define which images get the caption added. This way you can still maintain your accessibility (for screenreaders etc) by always having an ALT tag, but leave the description field blank if you don't want a caption. I wanted to restrict the the production of captions to textareas only, without relying on a container div for determining which images get processed. Doing this server-side just seems cleaner somehow Teppo - I could just as easily have used a regex, but domdocument just seems easier to me when it comes to tasks like this. I am still looking for a way to solve the issue of two images with the same filename somewhere on the site. Again, this only comes up if your pages are drawing content from other pages, but I do this often, so would like to solve - any ideas?1 point
-
1 point
-
@Horst, Thank you for greatly for working on this. This solved an issue where I had many tags showing up in the top navigation menu. @Ryan, that works under most situations, but it does not allow you to later search for those items. It would be nice to have a status of Hidden: Not excluded from lists and searches. Hopefully that makes sense to you.1 point
-
I just implemented possibility to add multiple shoping options.Yesterday I build small markup module which venders the shopping steps (1. cart, 2. information, 3. confirmation, 4. payment, 5. order complete). Also some minor tweaks here and there. I will also add option to choose currency (I am not planning to support multiple currencies, but possibility to choose what currency the shop uses will be there). Hopefully I get today all wrapped up and can commit it.1 point
-
1 point
-
Another approach is to do it with javascript. I like this method because it's just a progressive enhancement that uses the existing alt attributes (no duplication of text in the request). This is the method I used in the Foundation site profile, which takes the image "alt" attribute and expands it to a caption, like those seen on this page. Here's the JS that does it.1 point
-
1 point
-
It's best to have your translators do their job of translating static text once you've finished your development work. Either that, or like Antti said, use multi-language fields for stuff that you think may change regularly.1 point
-
1 point
-
@Adrian, You've been posting some really nice stuff - code and this module. Would you be able to put these stuff on Github and Gist so we can easily locate (and fork ) them and follow their development and perhaps contribute to? Many thanks.1 point
-
...Ok, here's my first processwire site: www.starsabalestrino.it Alessio: if you want you can add it to your gallery!1 point
-
You actually can do matrix sorting quite easy with floated elements and jQuery sortable, but the config needs to be changed to vertical and horizontal, not only vertical. I've done it for the Imagefield and it works ok.1 point
-
Czech Localization Pack. Current version: 0.9.5 (92 files) Changelog: Added some missing strings Updated some strings pw_czech_095.zip1 point
-
1 point
-
Ryan, If you not have time to setup an account we can point to my server for now! We can do the transfer when you have a moment in the future1 point
-
@NoDice: this sounds like a perfect match for repeaters. First you'll create the fields you need; one URL field for link href ("link"), one text (or textarea, if you need longer texts) for your description texts ("description") and one image field for your slideshow images ("image", limited to one image per field).. and also one repeater field (let's call it "slideshow" for this example) that you'll configure to hold all the fields mentioned here. After that you'll insert the code, which would work just as @diogo mentioned earlier: <?php if (count($page->slideshow)) { echo "<ul>"; foreach ($page->slideshow as $item) { $thumb = $item->image->size(600,250); echo "<li style='background-image: url({$thumb->url})'><a href='{$item->link}'>{$item->description}</a></li>"; } echo "</ul>"; } ?> I'm making some assumptions about what the markup for your slideshow is like, don't worry about that; you should be quite easily able to adapt above example for your specific needs.1 point
-
You probably mean stop words? Seems like a reasonable feature to me, especially if made configurable (as English stop words make very little sense / are sometimes even harmful for a site written in Finnish etc.) Just saying.1 point
-
I will soon have to create a link list fieldtype, where you could add links with url and text, internal and external. I'm surprised nobody done that yet, as it seems a basic feature a CMS should have. I've used repeaters until now and it's ok I guess too, but maybe a dedicated fieldtype would be nice. Another option is to use a Wysiwyg field as that would already allow for "easy" creating a list of links. Those are all very easy to setup option and flexible. But you know it's fun to develop for PW. Or anyone want to have a go or know if this would make sense at all?1 point
-
1 point
-
I agree with you in that having a text would be standard behavior -- for HTML hyperlink. It's very important to note that HTML hyperlinks created using the "a" element are separate entities from URLs. There are many use cases for an URL, so it wouldn't really make much sense to add an option for additional content that's related to only one of those. Repeater method described by @diogo is probably the best way to put things like these together. Another method (probably overkill for most use cases) would be creating a new fieldtype + inputfield for a hyperlink element. There one would definitely expect to be able to fill in text content (and other parameters too, as described by the HTML language reference I linked to earlier.) I would also like to point out that ProcessWire fields (fieldtypes) very rarely generate any markup. TinyMCE is an input method (inputfield) that generates markup and stores it in textarea fieldtype. Even in that category markup generating inputs are, in my opinion at least, quite rare.1 point
-
In your case I would use a repeater with a url field and a text field. People can add as many links as they want and it's clear what goes where. On the template you just have to do: foreach($page->links as $link) { echo "<a href='<?php echo $link->my_url_field; ?>'><?php echo $link->my_text_field; ?></a>"; } or, maybe better: if(count($page->links)) { echo "<ul class='links-list'>"; foreach($page->links as $link) { echo "<li><a href='<?php echo $link->my_url_field; ?>'><?php echo $link->my_text_field; ?></a></li>"; } echo "</ul>"; }1 point
-
Ryan, I've made all of the changes you suggested and I've put the module in modules directory.1 point
-
Thanks Ryan, after changing the session name I can login. If I change it back, I cannot. I assume that database sessions will solve this problem, but to install that module I needed to login first . Ok, a final comment now I have found the real issue. Using db sessions makes no difference, using 'wire' instead of session_name() still triggers the problem. After reading a comment on php.net about session_name() I checked my php.ini and session.auto_start was true. I don't know if I did that myself or it comes with a php update on debian, but setting it to false and restarting apache solved the problem of this topic.1 point
-
URL field only stores URL's, while what you're talking about here is HTML link tag and it's value. These are different things: http://www.xxyyzz.com is valid URL and thus can be stored in URL field <a href="http://www.xxyyzz.com">The text I want to show in place of the URL</a> is HTML link tag and can't be stored in URL field To achieve what you've described above I would suggest using textarea field with TinyMCE enabled (or without TinyMCE, if you prefer to write your tags as pure HTML yourself.) Other option would be storing URL in an URL field and text within text field -- ie. using two fields and outputting them like this in your template: <a href="<?php echo $page->my_url_field; ?>"><?php echo $page->my_text_field; ?></a> The best solution here, of course, depends a lot on where and how you want to use these values.1 point
-
@ShaltNot: semicolons are definitely comments in INI files, so altering a setting prefixed with semicolon won't affect anything. Also the setting affecting xdebug, as mentioned above, is actually xdebug.max_nesting_level. I haven't used xdebug myself so I'm not sure if it's settings are in php.ini or somewhere else -- it could have it's own config file too. One more thing to note is that you may have to restart your web server after altering PHP settings. Not 100% sure about this, but as it's a local server that probably won't do much harm either. Anyway, since your issue seems to be fixed, you may not have to worry about these anymore, just wanted to point these out in case that someone else stumbles upon this same issue.1 point
-
I'd like to add the table tools plugin to ckeditor. I've already tried adding "tabletools" to the list of Extra Plugins under CKEditor settings. also tried adding "TableTools" in the CKEditor Toolbar. nada I can see that the ckeditor module already has tabletools so not sure what I need to do to activate this plugin. Thanks! EDIT: Finally found out that the table tools plugin doesn't add anything to the toolbar. You right click on the table to get the context menu (slap forehead)1 point
-
Once 2.4 is ready and LanguageSupportPageNames is labeled as stable (it may be there already), I'm going to revisit the whole Multi-language documentation section, as LanguageSupportPageNames does change a lot with recommended approaches. I also just [last week] launched an update to http://www.tripsite.com that uses LanguageSupportPageNames, over thousands of pages and 5 languages. Previously it was using the multi-tree approach. It vastly simplified the underlying code of the site, and their editors are so much happier with this setup. The URLs are still mostly English (reflecting the previous names), but at least now it's up to them to decide what the URLs should be in each language. The PagePathHistory module is installed, so that whenever they change a page name, the old URLs will continue working. For instance: English: http://www.tripsite.com/bike/tours/around-venice/ Dutch: http://www.tripsite.com/nl/fiets/tours/rondje-venetie/ Dutch (old URL): http://www.tripsite.com/nl/bike/tours/around-venice/ Now making multi-language sites is so much more fun... I just wish I had more projects that needed it like this one! Hopefully the next major upgrade to this site will be to go responsive.1 point
-
You don't have to apologise to my facebook friends, unless I can have the friends without having an account... You can apologise to my cousins though1 point
-
Thanks so much for getting back to me, Ryan! Your proposed solution makes a lot of sense (I love how simple and elegant it is) - I'm going to give it a shot and see how it goes!1 point
-
Ha! I had a feeling this fit better in PW. Thank you so much for the explanation! And, "parent.on_frontpage=1" that is really really nice! If I can convince the client to make the jump I'll post my progress here. I would start by simulating this setup to see what response times I'll be getting. cheers, J *ps. didn't know about the spaces thing, good to know.1 point
-
All ProcessWire fields are indexed (including datetime fields), so I don't think you'll have a problem with it being slow. But if you want to retrieve and load a 1000+ pages at a time, that could be potentially slow (and perhaps run out of memory). It's important to place limits (i.e. "limit=50") on any queries that can return huge amounts of pages, in order to ensure that everything stays running fast. I don't think that would be slow. But paginate your results by placing a limit to be sure. Also, I doubt that you need the parent=/events/ since you are already specifying a template. Though if I understand your structure right, if you did want to specify a parent, you'd probably want to use has_parent rather than parent, since the time pages live under /events/some-event/ rather than /events/. Last thing to note is that you can't have spaces before/after operators like you do in your time.date_end > $today" -- that would need to be "time.date_end>today". Btw, you can specify "today" rather than populating a $today variable, if you prefer. Actually you can do this. But note the same suggestions I had above. There would also be this alternative, which might be potentially faster because ProcessWire is a little more optimized for parent-field matching queries than children-field matching queries (given that a page can have only 1 parent, but any number of children): $pages->find("template=time, parent.on_frontpage=1, enddate>today"); When you foreach the results of that, note they are 'time' pages rather than 'event' pages, so you'd want to refer to the parent in order to get the event.1 point
-
Hi Vineet - I read up a bit on the XML datafeed that FoxyCart provides, and that feed is what is read/parsed to decrement the inventory in something like the ModX plugin that is related to FoxyCart inventory; you should be able to easily hire someone to adapt that for processwire, and then you would be able to automatically remove sold seats http://modx.com/extras/package/foxycartinventory i guess the main snafu, again, is how to you prevent 2 users from both purchasing the same seats? You might have to use session variables, for example maybe when someone adds seats to their shopping cart, the page redirects to a processwire template that can run a script that would place the seats in that person's cart on 'hold' (and prevent them from being added to another users cart), so you would have to have 3 status types for each seat, SOLD, AVAILABLE and HOLD; then after the person checks out, your XML datafeed parser would check the sold seats against the ones on hold and then change their status to SOLD; you would also have to have it so that the cart expires in some short time frame, otherwise what happens if someone adds seats to their cart, but never checks out - i'm not sure what the default cart expiration is for FoxyCart. The bad news about OvationTix is that it is a complete system, and already does all of the things you have spent your time making, like it has it's own seating charts, seat selector, and backend management of shows, showtimes, etc.. So i don't think you would really want to use it, unless you need something full featured and needed it really fast; With Ovation, one of the other issues is that you can't for example make your own seating chart – the OT admins have to make that for you... (i think you explain to them the seating layout of the space and they configure that from their end..) My recommendation would be to see what you're clients budget is for the shopping cart component and the payment processing, and if they can afford it, then go with Foxycart; maybe search the FC forum for info on unique items and how to prevent multiple users purchasing, as well as if anyone else has done theater or ticketing.. Edit: i gave this more thought, and came up with the idea of keeping the add to cart and all of the logic for your site within processwire, for example using apesia's shopping cart module. Then you could control more elements and style to the cart and any also execute any custom processing you would need within processwire; all you would have to do is to make some changes to the module to let the last step bring the user to the foxycart checkout. For example you could wrap the whole cart view in a form element and use the foxycart tags to achieve adding all of the products from the 'processwire cart' to the 'foxycart cart' and redirect to the checkout; Foxycart makes it easy to add multiple items to the cart at once.. <form action="http://YOURDOMAIN.foxycart.com/cart" class="foxycart" method="post"> <input type="hidden" name="name" value="Les Miserables" /> <input type="hidden" name="theater" value="Imperial Theater" /> <input type="hidden" name="datetime" value="06-05-2013 8:00PM" /> <input type="hidden" name="seatNo" value="Q13" /> <input type="hidden" name="2:name" value="Les Miserables" /> <input type="hidden" name="2:theater" value="Imperial Theater" /> <input type="hidden" name="2:datetime" value="06-05-2013 8:00PM" /> <input type="hidden" name="2:seatNo" value="Q14" /> <input type="hidden" name="cart" value="checkout" /> <input type="submit" value="Checkout" /> </form>1 point