-
Posts
6,648 -
Joined
-
Last visited
-
Days Won
365
Everything posted by bernhard
-
Blog profile - displaying posts in multiple columns ?
bernhard replied to Maverick's topic in General Support
hm... not really read here: http://getbootstrap.com/css/#grid-example-basic sorry, not enough time to go in detail. note that bootstrap is only one option that is not built into the blog profile! you would have to include it to your head section: http://getbootstrap.com/getting-started/ -
-
Blog profile - displaying posts in multiple columns ?
bernhard replied to Maverick's topic in General Support
hi luckybonanza, welcome to the forum. with processwire you have complete control over how you want to present your data, but that means you should have at least basic understanding of HTML + CSS. what you want to achieve is called a "grid". you can use bootstrap for example: http://getbootstrap.com/examples/grid/ or pocketgrid of course that are just 2 possibilities of many many more... -
what is not working? did you put your divs inside a div class="row"? <div class="row"> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4</div> </div> i prefer pocketgrid (got the hint on this forum)
-
hi gerald, greetings from vienna if i understand you correctly your wish is already built in (2.5.3):
-
$session->redirect($page->child->url); renders blank
bernhard replied to Claus's topic in Getting Started
hi claus, welcome to pw! i'm sorry, i think i don't really understand what you are trying to achieve with your first question and especially WHY you want to do that? as simple as that: <?php $session->redirect($page->child->child->url); ?> regarding renderNav: how do you call this function? it lists all pages you submit to the function, so the question is what pagearray you submit to it. read something about selectors: https://processwire.com/api/selectors/ you could do something like this: markupsimplenavigation has some more options like (exclude/include root-page) for building menus: https://processwire.com/talk/topic/1036-markupsimplenavigation/ maybe you can give us a clear site structure like this: - home |- products | |- apple | |- banana | '- orange |- news | |- news1 | '- news2 '- sitemap or maybe it's already clear for others, so you will get good answeres soon -
tried it on lightning.pw - absolutely great module!!! thank you!
-
hi zeka, welcome to processwire i switched from seblod to pw some months ago and i hope you will enjoy your move as much as i do! you will be impressed by the great community and the fast and knowledgeable answers you will get here, i'm sure (knowing the pain with seblods forum support...). to your question... coming from joomla/seblod you have to change your mindset a little bit, i hope that i can help you with some comparisons: articles/items (joomla/seblod) = pages (pw) in pw everything is a page! thats very important to understand. pages can store any data you want. it's like in seblod everything is stored in joomla articles, pw stores everything in pages. pages can have completely individual set of data-fields (eg. headline, body, images, starttime, endtime etc.). this setting of fields is defined by "templates": content types (seblod) = templates (pw) in your templates you define which fields will be available in your page. some examples: template "blog-post.php" # field "title" # field "body" # field "author" template "product.php" # field "title" # field "description" # field "price" # field "image" so if you created a new page "product" you would only have the fields "title, desc, price, image" available for editing. list&search (seblod) = selectors (pw) forget list&search types!! selectors are the way to go with pw say we want to display some products with template "product" from above: $products = $pages->find("template=product, price>100, sort=price"); foreach($products as $item) { echo "<a href=\"$item->url\">$item->title</a><br>"; } see here for a quick glance: http://processwire.com/api/selectors/ (yes, everything is very well DOCUMENTED - that's another huge difference to seblod ) don't try to bring editing features to the frontend unless it is REALLY necessary joomla has a very complex backend, so i tried to hide this complexity for my clients by giving them edit access only for some parts of their website from frontend. processwire's backend is so simple that you will not need to hide it from your client anyway: if you have some experience in seblod, i think you will learn pw really fast and enjoy how clear and simple everything can be and now put everything together: https://processwire.com/talk/topic/693-small-project-walkthrough-planets/ if you have no dev-environment you can instantly setup a fresh copy of processwire here for free: https://lightning.pw/ have fun with processwire
-
hey guys, thank you! it worked for me with the following values (for testing): index.php ini_set("session.gc_maxlifetime", 60); // changed $config->sessionExpireSeconds to 60 config.php ini_set('session.gc_probability', 100); // 100% probability ini_set('session.gc_divisor', 100); ----> it cleared all session files older than 60 seconds on every pageload.
-
hmm... thank you sinnut for your fast reply! i'll give it some more days. just for the record, i have >7500 files right now. lets see how that changes over the next days... couldn't i also try to increase probability to 99 or 100? to make sure that it works and then change it back to 1?
-
hi everyone, unfortunately i came up to this problem as well. server is Ubuntu 12.04.5 LTS; i had > 140.000 files in the sessions folder i have these two lines in my _init.php file (basic intermediate profile structure) ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 100); phpinfo in one of my template files says this, so i guess the changes should be working 2 days ago i deleted all of the session files, but today i have again > 7000 files, oldest from the day before yesterday, so far over 24 hours old! any ideas? thanks in advance!
-
great that you fixed it. when i tried to change the focusarea i think it didn't update the cropping->inside image. is this a bug or did i miss anything? look at the third image: it has still the old focusarea. i also had to append ->url to every image in your github (and first post) sample to work
-
hi totoff, using the TemplateFile class is perfect for this, have a look at ryans blog profile: https://github.com/ryancramerdesign/BlogProfile/blob/master/templates/archives.php#L101 simple way: file "site/templates/markup/contact-markup.php" (naming it -markup here to point out the difference to the standard template file) John Doe<br> Sample Street 1<br> Sample City template file eg "site/templates/contact.php $contact = new TemplateFile(wire('config')->paths->templates . 'markup/contact-markup.php'); echo $contact->render(); // don't forget to echo! more flexible: with variables! markup/contact-markup.php <?= $name ?><br> <?= $address ?><br> <?= $city ?> contact.php $contact = new TemplateFile(wire('config')->paths->templates . 'markup/contact-markup.php'); $contact->set('name', 'john doe'); $contact->set('address', 'sample street'); $contact->set('zip', 'sample city'); echo $contact->render(); edit: in your case you can do $sidebar = $contact->render() instead of echoing it... forgot the point of delayed output
-
+1 ImageFocusArea if you drag the area outside of the modal window it will close the modal. maybe you can handle this? besides that, cool module/idea. looks promising!
-
thank you mindfull!
-
https://processwire.com/talk/topic/1920-processwire-logos-download/?p=26899
-
hey nico, i would be very interested in a showcase how you did that
- 7 replies
-
- 1
-
-
- CRM
- Project Management
-
(and 5 more)
Tagged with:
-
you mean you want to apply the "active" class only to the first item? maybe something like this <?php $active = ' active'; // set active for first item foreach($page->images as $img) { ?> <div class="item<?= $active ?>"> <img src="<?php echo $img->url; ?>" /> <div class="container"> <div class="carousel-text"> <h2><?php echo $img->description; ?></h2> </div><!-- /carousel-text --> </div><!-- /container --> </div><!-- /item --> <?php $active = ''; // remove class "active" for following items } ?> i like to use short tags <?= $var ?> instead of <?php echo $var; ?> maybe you have to change this depending on your server
- 4 replies
-
- 1
-
-
- Current image
- images Current image
-
(and 1 more)
Tagged with:
-
hi salles, welcome to the forum there's also a blog module - i have no experience with it, but maybe it fits more to your needs
-
ok your question was some days ago but anyway: this post from ryan should give you an answere! as far as i understand, the main benefit is that you can define things wherever you want and then do the output at the right position. if you had a slider in a sidebar for example and needed a special stylesheet for that slider it would be too late to include that with a html-first approach. outputting everything afterwards lets you add $stylesheets[] = 'slider_style.css'; wherever you want and then put it out in your <head> right in place like this: <head> ... foreach $stylesheets echo <link ... stylesheet_name.css> </head> <body> <div id="main"></div> <div id="slider"></div> </body>
- 206 replies
-
- 1
-
-
- standarisation
- templates
-
(and 1 more)
Tagged with:
-
Thanks,of course i know that but i want to do that 100% automatically
- 6 replies
-
- userAuthSalt
- migration
-
(and 2 more)
Tagged with:
-
Yes that's what i thought and why i dont want it left unchanged. Why not by site profile? Because i dont know how to do that programmatically
- 6 replies
-
- userAuthSalt
- migration
-
(and 2 more)
Tagged with:
-
what if i wanted to copy a complete site to eg site-copy for a multisite setup... would i have to change the value for userAuthSalt or is it ok to have the same value in multiple site instances?
- 6 replies
-
- userAuthSalt
- migration
-
(and 2 more)
Tagged with:
-
Help understand the _ files in the template
bernhard replied to mikeroosa's topic in Themes and Profiles
do you know this thread? https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ a lot to read i really like the structure with _func.php, _init.php and _main.php - very clear, very flexible. i'm doing it like this most of the time: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/?p=75853 -
i just tried out your module, thanks for creating this! i had the warning that the site and root folder where writeable and should not be, so i set them to 0550. 1) is 0550 correct for these folders? 2) why does PW by default create its site folder with 0755? is your diagnostics warning just an additional security or should one everybody set site+root not writeable? thanks!