-
Posts
1,465 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Peter Knight
-
I'm definitely missing some key logic here. If I look at my current blog-post.php template, the entire contents of that template are <?php /** * Post template * Demo template file populated with MarkupBlog output and additional custom code for a Blog Post * */ //CALL THE MODULE - MarkupBlog $blog = $modules->get("MarkupBlog"); //subnav $subNav = ''; //subnav: get date info for creating link to archives page in subnav $date = $page->getUnformatted('blog_date'); $year = date('Y', $date); $month = date('n', $date); //subnav: if there are categories and/or tags, then make a separate nav for them if(count($page->blog_categories)) $subNav .= $blog->renderNav(__('Related Categories'), $page->blog_categories); if(count($page->blog_tags)) $subNav .= $blog->renderNav(__('Related Tags'), $page->blog_tags); //subnav: contains authors, archives and categories links $authorURL = $pages->get('template=blog-authors')->url; $archivesURL = $pages->get('template=blog-archives')->url; $subNavItems = array( $authorURL . $page->createdUser->name . "/" => $page->createdUser->get('title|name'), $archivesURL . $year . "/" . $month . "/" => strftime('%B %Y', $date) ); $subNav .= $blog->renderNav(__('See Also'), $subNavItems); //main content //render a single full post including title, comments, comment form + next/prev posts links, etc //$blog->postAuthor(): if available, add 'post author widget' at the end (or at the top if desired) of each post // $content = $blog->renderPosts($page) . $blog->renderComments($page->blog_comments) . $blog->renderNextPrevPosts($page);//without post author /* for this demo, renderComments() has to adapt to whether blog commenting feature was installed or not whilst remaining blog structure/style-agnostic in your own blog install, you would know if you enabled the feature so there would be no need for such a check in addition, our 'check' code is not code you would normally use in a template file. we use such code here to be both foolproof that the commenting feature is installed and blog structure-agnostic */ #not foolproof; user could have post-installed custom commenting feature (e.g. Disqus) with a similar field blog_comments //$renderComments = $page->template->hasField('blog_comments') ? $blog->renderComments($page->blog_comments) : ''; $blogConfigs = $modules->getModuleConfigData('ProcessBlog'); $renderComments = $blogConfigs['commentsUse'] == 1 ? $blog->renderComments($page->blog_comments) : ''; $content = $blog->renderPosts($page) . $blog->postAuthor() . $renderComments . $blog->renderNextPrevPosts($page);//with post author widget //include the main/common markup require_once("blog-main.inc"); I can see towards the end that Kongondo has a content variable and is outouts Page Author Comments Next / Previous links I guess the black hole for me is - where is the html markup which wraps around these? it's not in blog-post.php and we're not supposed to touch blog.module. Perhaps I'm approaching this with my old MODX mindset and the Articles school of templating where each part of the blog (posts, comments, Tags) had their own mni template with html.
-
Thanks man. Noted about the menus. Thats what the Christmas break is for, right?
-
Hu guys I'm delighted to say that my new site is powered by Process Wire. Or rather, "Priceless Wine" and "Princess Wine" as my iPhone mistakenly predictive texts the name. There is also a page on ProcessWire in the CMS section which I'd love your feedback on. Currently I don't think it truly communicates PWs best features for Editors but it's a good start. Only almost finished? The site isn't 100% complete so consider this a "soft launch". Once complete, it'll replace my existing edenweb.ie site which wasn't being updated or developed as much as it should. - - - - - - - - - - - - - - - - - - - - - - - - - - - Background - Why ProcessWire pt 1. A few months back a key client who uses up approx 3 days of my week (for over 3 years) announced a pause on their web and marketing activities for various internal corporate reasons. This happened quite suddenly and obviously that left me with half my week "open" and needing to be filled. It also meant that I would be looking for new work and approaching prospects with a site which was approx 3 years out of date, under developed and didn't really communicate my latest skills or work. Not ideal! - I rapidly needed something live. But more importantly, I needed something better. I needed something built on a CMS which would allow me to rapidly publish content and accelerate future ideas and development. In short, my current CMS is/was great but I was tired of working around default field sets and presumptions it made about my content (amongst other reasons). With ProcessWire, the ability to have a page with just two fields (if I want) is remarkably underestimated. It means I can customise field layouts appropriate to my content. Even better - it means I can customise field layouts appropriate to my clients content and I choose my CMS on their requirements. Anyway, I made the decision to take a deep breath, take a few weeks to enjoy the extra unexpected free time and to rebuild the site in PW. My business will be 15 years old this January and I thought I'd mark the new year with a new domain, new business name and a new CMS. Here's to new beginnings! - - - - - - - - - - - - - - - - - - - - - - - - - - - Under the hood At the time of writing, the site is running 2.5.10 dev. There's not a huge amount of Modules running in the background. Where I've used a Module, it's been to accentuate back-end functionality rather than the front end. Config allows me to make setting changes directly within the admin. Its a great Module and saves me editing any config files and manually FTP'ing. Lister Pro gives me an easy way to manage the "studio updates". Hanna Code allows me to work with some of the tricker layouts such as the page on PW Forms is used for the Contact Form and I'm using direct embed with some jQuery and CSS to strip out some unwanted formatting. ProCache is running in the background to speed things up. Thats more out of professional curiosity right now Vs any focuseed attention on site speed. AIOM was running recentlyto minify all my style sheets and JS but I pulled it recently. might revisit. Blog module is running the er, blog! I've some work to do there in terms of content layout etc but it's a wonderful piece of work. RenoTheme is keeping everything lovely in the admin Upgrades is a real life saver and allows me to update the whole CMS in a few clicks MarkupSimpleNavigation is powering the menus. Regarding the actual PHP used in templates, I doubt there's anything there of interest to you seasoned PHP guys. I've achieved 99% of the site using simple foreach loops and PW selectors. - - - - - - - - - - - - - - - - - - - - - - - - - - - Background - Why ProcessWire pt 2. When I first heard of PW, I was very content with my current CMS so I had a brief look around the site, read some blog posts but ultimately moved on. It looked interesting but I didn't really have a need to investigate further. Fast forward a few years and realising I need to expand my CMS toolset a bit, I had a better look at PW and downloaded it. I really liked *some* elements and appreciated how I could determine the field layout. You see where this is going? Interest increasing! But honestly? I couldn't imagine putting my clients on front of PW with the theme it had (at the time) and TinyMCE as the default editor. It looked real clunky and I wasn't sure I wanted another CMS with the tree representing pages. Somewhat trivial and shallow reasons not to use something but there we go. I'm a designer and I also have to think about my clients experiences too. But I kept an eye on PW and in the background, a few things were happening which were interesting. Communication from Ryan was frequent, open and transparent Planned updates were being released on or before schedule Unplanned updates were often released on or before I realised I even needed them I discovered TinyMCE could be swappable for CK editor and I could use alternative admin themes I discovered a few Modules for listing pages via DataTables as opposed to tree mode Not really sure of the timeline here but this is from mid 2013 onwards btw. The crazy things is from that point onwards, it seemed increasingly impossible to ignore PW. Every few months there was an amazing leap in either the core features or some brilliant module I hoped for was published. EG: I was looking for a way to decrease the time it takes to publish a page in the right place with the right template and the Add New button appeared I was looking for a way to represent pages in a List rather than a tree and ListerPro was announed Hoping for a better way to upgrade PW and the Update module was released Needing a proper blog with categories and the Blog module was there Looking for a better admin UI and RenoTheme came along Needed more flexible field layouts in a matrix and ProFields released Looking for a way to store chunks of html/php etc and Hanna Code was released Ok, that sounds like an Arethra Franklin song about PW but you get the idea! Seriously, it got to the point where I was either silently (or via the Forums) hoping for a particular feature and Ryan would already be working on it or would just release it having finished it. And it was always done in a much more elegant, scalable and powerful way than I imagined or hoped. Just last month I wrote a forum post highlighting a wish for an admin-based settings module. Thinking "nah, there I go complicating things again. Make do with the config.php file" I deleted it. Literally the next day, the Config module was released. It's spooky! Anyway, I've rambled on a bit. But to sum up - I try to redo my site every few years in a different framework and platform. I can see the front-end framework changing in future but I think EdenStudios has found a good, permanent home in PW. PW and Ryan are doing everything right. It's not the only great CMS but it's a damn fine CMS in great hands supported by a great community.
-
I love the Telecrapper. Some guy hooked his landline up to a computer which could recognise incoming cold calls by their number. His computer would then kick in with a series of random conversations he'd pre-recorded. Here's a recording http://www.ebaumsworld.com/flash/play/464574/ Here's the guys homepage http://myplace.frontier.com/~pumamanor/ At the end of that page theres a few great audio files although the sound quality isn't great.
-
I might jump in here too and ask the same thing. Hopefully we're asking the same question. Currently, my /blog/posts/ page lists all my posts in the structure as follows Post Title Posted by Author Name. Date and Time Post summary with ellipses at approx 50 words If we want to change this to add the contents of a field such as Post Title Post_Summary field Posted by Author Name. Date and Time Post summary with ellipses at approx 50 words would we need to edit the file called MarkupBlog.module ? And if so, how is that not overwritten when we perform an update to the Blog module?
-
I have the same issue with 2.5.10 dev even when I remove the old session files. I've just moved the site from my local environment to the live server and am getting the same error Unrecognized HTTP host: 'domain.me' - Please update your $config->httpHosts setting in... domain.me is just for illustration but you get the idea. This is my config $config->httpHosts = array('domain.me','www.domain.me' );
- 13 replies
-
- 1
-
-
- Unrecognized HTTP host:
- error
-
(and 1 more)
Tagged with:
-
That's interesting. I do it the other way around as to me, the homeage consists of contents from deeper within the site.
-
Have I got this right? You have a portfolio section in PW. It consists of several Projects and each project is a Page. Projects - project a - project b - project c On each Project field, you have the followign fields Title Image Tag Body etc You then want to pull 1 or more projects onto the homepage and display just the contents of these fields Title Image Tag
-
Thanks so much. Great to read how it was approached and implemented. The photography of the plants is largely very good. Was that something you had a part in or was there a library you chose from?
-
I guess both. Just a brief description of what going on in the background in terms of PW, PHP and then the JS. Are the zones and origins etc tags in PW and how you are pulling them onto a web page and then displaying results?
-
Beautiful work. If you have time, can you explain how the assessments filtering works?
-
@christophe you can exclude directories and files.
-
Quick followup in case anyone else comes to this thread. I had a look at all the links and eventually settled on Akeeba Solos (thanks @cstevensjr) as it was the most compatible with my server. The website is a little unclear but you install it on your server, enter your database credentials and you have quite an array of backup and config options from that point onwards. Setting up my backups (databases and files) with Dropbox was really simple. There's also 3 different options for scheduled backups via Cron.
-
Web site elements stretched and overlapped vertically on big monitors
Peter Knight replied to pwired's topic in Dev Talk
Is the issue on the 25" site exclusive to the site you're building? -
Some of you may be aware of Google Trends and the ability to search for a keywords trend over time. Here's one for PW. There's a very encouraging (and well deserved) climb north. Some crazy dudes from Germany obviously like the CMS too
-
In MODX there's an Extra called GetResources which allows you to loop through Resources and display the contents via a mini template (TPL). For the PW equivalent, I use the foreach loop combined with selectors. Simple enough. Back to getResources, I had a great setup whereby I could loop through several resources and output the content through a different TPL (mini template) depending on a field value within a Resource. IE I'd end up with a single page but the content inside would have several different layouts such as Block 1 = Image on left. Text on right. Blcok 2 = Image on right. Text on left. Block 3 = Text on top. Image underneath. Edit: There's a visual explanation here: http://www.sepiariver.ca/blog/modx-web/how-to-dynamic-content-blocks-with-modx-getresources/ Is this relatively simple with PHP and PW? I'm not looking for code samples but a more accurate idea of what to google. IE What's the proper terminology in PHP?
-
Sorry Kongondo. Must have missed the notification and I see you've replied to something else too. Will pickup on the PM channel.
-
Thanks a mill. For what it's worth, I found your blog docs yesterday. Missed that particular setting but self-fixed another issue
-
Another gem. Thanks for highlighting
-
Command (or Control) + S to save a page. I realise there is both Save (initially) and then Publish and Save and Keep Unpublished. Saving something is more of an automatic action and a requirement. Publish could be kept manual ?
-
This is called the ProcessWire tractor beam. You've been pulled into its path! You wake up one day and know you won't be happy until your own site is completely rebuilt in PW. Even though you don't have time, you have real work to do and your current site and CMS have been perfectly "ok". Before you know it your life is full of echo statements, you're visiting the forums multiple times per day and you can't sleep at 5am because you're crazy excited about the great thing PW allowed you to do with your site that you never thought possible. Anyway, nice write up. Thanks for sharing
-
You mean it was Pirated?
-
Have this wierd select box issue. Anytime I have a list of Related Categories or Related Tags, I get a stray selectbox repeating the Categories or Tags Not sure if it's my browser or the module or Zurb Foundation auto inserting some accessibility thing. Does it happen to anyone else using the Blog Module?