-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Ryan, you have a MySQL syntax error in SelectableOptionManager.php. This prevents values from being updated. You are missing a 'space' in the sql statement on line #548 the concatenation gets mangled up resulting in this: Option 14 'New York': SQLSTATE[HY093]: Invalid parameter number: parameter was not defined The fix is simple: Change: $sql .= "WHERE fields_id=:fields_id AND option_id=:option_id"; To: $sql .= " WHERE fields_id=:fields_id AND option_id=:option_id"; I see the 'space' on line #543 but I suppose that's only for multi-language environments? I guess I am getting the above error because I am testing on a single language environment. $sql .= ", $name=:$name "; Not sure how the suggested change will affect those in multi-language environments, but am sure you will sort it out Also filed a bug report in GitHub case you miss this.
-
OK, I see and agree with your point guys...
-
I see, but adding pages below has the advantage of being able to add multiple pages in one swoop. I wouldn't want to reinvent the wheel myself, but of course, it's your decision I edited my post above: Did you see my request?
-
This is in-built in ProcessWire and it already works with your Inputfield. I have tested and it works fine unless I am missing something? A request: Do you know if it is possible to sort the tags by drag and drop like in asmSelect? In your case this would have to be horizontal, of course..
-
Like this: <img src='https://github.com/LostKobrakai/InputfieldChosenSelect/raw/master/screen.png' /> in your README Since this will be the modules support forum, please add instructions here on how to install and use it. Also add in your README, thanks.
-
You can only sort by fields that exist in that template or internal properties (e.g., sort). There is no field called 'date' in the template 'blog-post'...unless you added it yourself? Otherwise, the following should work. I don't know why you had two $pages->find()? Did you also add the field 'blog_summary'? <!-- CENTRE COLUMN - MAIN --> <div class="small-12 medium-9 large-9 columns "> <!-- START Nested Column containing featureimage and post-summary --> <?php $blogposts = $pages->find("template=blog-post, sort=-blog_date, sort=sort"); foreach ($blogposts as $b) { echo " <div class='row row-spacer'> <div class='small-12 large-6 columns'><img src={$b->blog_images->first()->url} /></div> <div class='small-12 large-6 columns'> <div class='posts-date'>{$b->blog_date}</div> <h3><a href='$b->url'>{$b->title}</a></h3> {$b->blog_summary}</div> </div> "; } ?> <!-- END Nested Column containing featureimage and post-summary --> </div>
-
DISCLAIMER: The Blog Module already provides an in-built Cleanup Utility that enables you to remove all its components. As per the instructions in the module's README, which must be thoroughly read before using the module (as instructed in the first post in this thread and in various other places), in case you wish to uninstall Blog, you FIRST have to run the Cleanup Utility whilst logged in as a Supersuser. Further, as of this writing, a clear warning text is now visible right above the uninstall button in Blog's module configuration screen reminding you of this fact. Failure to follow the correct uninstall routine means that you will not be able to reinstall Blog until you (often manually) delete all the leftover components (that the Cleanup Utility would have removed for you) - a tedious, frustrating and painful exercise. In case, for some reason, you did not adhere to the above instructions, I am providing in the link below code to help you automatically remove any Blog leftovers in order for you to reinstall the module (if you wish, of course) or in case you just want to clean up. On install, Blog stores the IDs of its main pages in its configuration settings. Uninstalling Blog means those settings are lost. Hence, if using this code, the only way to find Blog pages is by their templates which in some cases, may not be very foolproof. This and others issues are documented in the utility code linked to below. This code is provided as is, with no obligation on my part, without any warranty, implied or otherwise. In plain English; whilst I have thoroughly tested the code, you will be using it at your own risk for which I will bear no responsibility . The code should ONLY be used in case you reversed the uninstall procedure; otherwise use the normal procedure (see README) to uninstall Blog. Link: blogCleaner Instructions: Back up your database and template files Log in as a Supersuser Copy and paste the Cleaner code in the link above at the very top of a template file Save the template file On the frontend, visit a page that uses that template file The Cleaner's screen will be loaded Tick the checkbox to agree you 'know what you are doing, etc..' Complete the questions about the type of Blog you had before the uninstall Run the Cleaner If no errors found a success message will be displayed In your Admin, check that things went OK (and if need be re-run the Cleaner) Restore the template file in #3 to its previous state Save the template file Reinstall Blog (optional ) Screens ------------------------ PS: I hope none of the above comes across as rude or forceful. I'll read this again in the morning just to be sure or in case someone PM's me, whichever is the sooner . I will then amend as appropriate.
-
Update: Blog version 2.3.3 In addition to the very clear instructions on how to uninstall Blog (README), I have added an even clearer textual reminder/warning in Blog's module configuration screen to first run the in-built Cleanup Utility before uninstalling the module. Committed to master...(including the new renderRelatedPosts()method discussed a couple of posts up.) See next post about a utility to help when disaster strikes, aka, despite the very visible new warning text and despite the clear instructions you somehow find yourself with Blog components left in your hands having made the mistake of first uninstalling Blog and now you can't reinstall it without going through some very tedious manual cleanup....
-
@LostKobrakai, I suggest you add this to the modules directory if/when you can? I think it is a useful addition, thanks!
-
@LostKobrakai, Your implementation is very nice actually. I have just tried it but its not working for me. I am just seeing an unstyled multilple select field. I'll test further later to find out what's going on...
-
An alternative would be to base this on the current relevant pagefields, then float-left those asmSelect <li></li> coupled with some CSS styles and you are good to go...
-
In my book, web design is part and parcel of development ...frontend development...
- 17 replies
-
- 3
-
-
- webdesign
- workinprogress
-
(and 3 more)
Tagged with:
-
I think you can use 'Off Topic > Dev Talk'
- 17 replies
-
- webdesign
- workinprogress
-
(and 3 more)
Tagged with:
-
It allows you to save settings for a field on a per template basis. Let's say for a template called 'flats' you want the label of that field to be 'Available'. On another template, , called 'agents', you can reuse the same field but give it a different label, e.g. 'Premium'... You can also edit context settings when editing the list of fields when editing a template. Hover your mouse over the label of the field and an arrow will appear. Click on that, it opens a modal and you can set 'in context' changes there. Recent changes to PW (can't remember version) introduced the ability to save lots (all?) field settings on a per template basis. This is a really powerful feature, like many others in PW
-
This is basically an aesthetics issue? So instead of this listing of selected pages in your page field in page edit mode: Tag 1 Tag 2 Tag 3 Tag 4 You want... Tag1, Tag 2, Tag 3, Tag 4..... Beaten by @LostKobrakai...again! That is exactly what I wanted to suggest... Edit 2: Using jQuery Autocomplete (that is what is used in some page fields) multiple..., there is no need for typing complete tags by hand; They would be auto-suggested as illustrated here: http://jqueryui.com/autocomplete/#multiple and lined up horizontally...
-
If max files = 0, then your images fields is an array and also needs to be looped or grab an image using $image->first() or $image->eq(2) if you only want a single image. Am surprised that the url was output though...hmmm.. Try the following... //Loop through Carousel repeater on this page foreach($page->Carousel as $Slider){//note that repeater items are just pages. So $Slider is a page 'with fields' //loop through the images array foreach($Slider->Slider_Graphic as $graphic) {//foreach image field in each $Slider page... echo $graphic->url; echo $graphic->description; } }
-
is that a 'single image' image field?
-
Thanks for sharing. Just cross-referencing with this other similar topic: https://processwire.com/talk/topic/4125-raspberry-pi-with-apache-and-processwire/
- 38 replies
-
- 1
-
-
- webserver
- raspberrypi
-
(and 1 more)
Tagged with:
-
That's the beauty of ProcessModules...you can pretty much throw anything at it and it will output it....plain HTML, whatever. I have had a quick look at the code and it's pretty much plain HTML in many places...added to that, some CSS to style it...
-
Just a by the way, alternatively, with the latest addition to the core, where two modules with the same name can co-exist.....you can copy the module and make changes to the hard-coded stuff....
-
Brilliant! Can't wait to play with this one
-
Nice one Felix! Thanks for the write-up too... <btw>oh, the NHS [uK] is great but much simpler to understand compared to the German labyrinth-of-a-health-system </btw>
- 4 replies
-
- beihilfe
- restkostenversicherung
-
(and 1 more)
Tagged with:
-
Well this is not true...at least not if you followed the instructions to the letter . The instructions are very clear. There is no need to manually uninstall anything in Blog 2. Uninstall is a two step process (i). Use the Cleanup first (ii) Uninstall the module https://github.com/kongondo/Blog#uninstall To remedy your situation, you need to delete the role 'blog-author'.
-
Is this already live? Are you not able to reinstall and select style 2?
-
Worked for me with the following code (but - see below): <?php $small = ''; $large = ''; if (count($page->images)) { $i = 1; foreach ($page->images as $img) { $thumb = $img->size(200,150); $small .= '<li><a href="#pic' . $i . '"><img alt="" src="' . $thumb->url . '" /></a></li>'; $large .= '<div><a name="pic' . $i . '"></a><img alt="" src="' . $img->url . '" /></div>'; $i++; }//end foreach $page->images as $img }//end if count $page->images ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" /> <style type="text/css"> #gallery { width: 600px; overflow: hidden; position: relative; z-index: 1; margin: 100px auto; border: 2px solid #003C72; } #navigation { list-style: none; padding: 0; margin: 0; float: left; } #navigation li { padding: 0; margin: 0; float: left; clear: both; } #navigation li a img { display: block; border: none; } #navigation li a { display: block; } #full-picture { width: 500px; height: 375px; overflow: hidden; float: left; } </style> </head> <body> <h1><?php echo $page->title; ?></h1> <div id="gallery"> <ul id="navigation"><?php echo $small?></ul> <div id="full-picture"><?php echo $large?></div> </div> </body> </html> However, as you can see in the discussions on the link you provided, there was an issue with page scrolling. An alternative version was provided here For the updated coded, the following code worked for me (I had to tweak the CSS because I used large images). You might want to resize your images using ProcessWire rather than CSS. You can see the demo here (expires in 7 days): http://aluminum-nue.lightningpw.com/gallery/ <?php $slides = ''; $navigation = ''; if (count($page->images)) { $i = 1; foreach ($page->images as $img) { $slides .= '<div id="slide' . $i . '"></div>'; $slides .= '<img src="' . $img->url . '" alt="" />'; $navigation .= '<a href="#slide' . $i . '">' . $i . '</a>'; $i++; }//end foreach $page->images as $img $default = '<img class="default" src="' . $page->images->first()->url . '" alt="" />'; }//end if count $page->images ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" /> <style type="text/css"> #image-slider { margin: 0 auto; width: 1500px; } #navigation { margin: 5px 0 0 0; text-align: center; z-index: 10; } #navigation a { text-decoration: none; background: #003C72; padding: 2px 6px; color: #FFFFFF; display: inline-block; } #navigation a:hover { background: #0182C4; } #slides { height: 980px; overflow: hidden; position: relative; } #slides img { position: absolute; top: 0; left: -500px; } #slides img { z-index: 1; opacity: 0; /* animation */ transition: all linear 400ms; -o-transition: all linear 400ms; -moz-transition: all linear 400ms; -webkit-transition: all linear 400ms; } #slides div { display: none; position: fixed; } #slides div:target + img { left: 0; z-index: 5; opacity: 1; } #slides img.default { left: 0; z-index: 5; opacity: 1; } #slides div:target ~ img.default { z-index: 1; opacity: 0; left: -500px; } </style> </head> <body> <h1><?php echo $page->title; ?></h1> <div id="image-slider"> <div id="slides"> <?php echo $slides?> <?php echo $default?> </div> <div id="navigation"><?php echo $navigation?></div> </div> </body> </html>