-
Posts
4,632 -
Joined
-
Last visited
-
Days Won
55
Everything posted by apeisa
-
How to get image scaled down proportionally (given a constraint)
apeisa replied to landitus's topic in General Support
There might be better way to do it, but this should work: if ($image->width > 32 || $image->height > 32) $img = $image->size(32,32); else $img = $image; -
Looks like it tries to create /MarkupSitemapXML/ folder in the root. There should be full path to cache folder visible on error msg.
-
Also if you want to add it to some pages, just create checkbox field called "show_calendar" and add it to templates where you need calendar to show. Then in your templates use this: <?php if ($page->show_calendar) { echo "<iframe here>"; } If you need the calender in middle of your content, then you have few options. First one is to edit your body field tinyMCE options and let it allow iFrames and their attributes. Not sure how well it works in admin edit, but shouldn't be too bad. Good thing here is that it allows different iFrames easily. Bad thing is that editor can add harmful code inside content. Other option is to use somekind of tag inside your content, ie. [[CALENDAR]] and then replace that in your template file with actual calendar code.
-
raydale: welcome to the forums. Always glad to have experienced cms users in to the community. The more you will use PW the more and more you will love it. I have actually found that many times I think that something have to be impossible or very difficult, because my experience with other cms have taught me to think that way. One post here on the forums and solution is probably under 5 lines of code That is actually very interesting topic you linked. so I'll continue reading it, thanks for sharing.
-
Thanks Ryan, this will definitely be helpful.
-
Ah sorry, I forgot to mention that I got error in my email. That is why I don't know which /site/ folder I look into, because I have like 20 sites already.
-
I have multisite setup using symlinks on /wire/ folder. When I get error messages they are something like this: Unknown User:/?/:ProcessWire Error:Exception: Fieldtype 'FieldtypeMapMarker' does not exist (in /path_to/pw/wire/core/Field.php line 200) Now I don't actually have a clue which site is causing this error, since that path is common for each of my sites. Would it be possible to get hostname or actual full url where error occured?
-
Multi-section site using subdomains and single PW setup
apeisa replied to Robert Zelník's topic in General Support
More about this: http://processwire.com/talk/topic/680-multiple-sites-from-one-install/page__hl__domain__fromsearch__1 -
I think one way to identify if PW is used is assets urls. Images and files are usually saved on /site/assets/files/<pageid>/filename.jpg
-
Assigning pages to a Subnavigation, featuring those pages on homepage
apeisa replied to Alex's topic in Getting Started
Yes, you can set your portfolio page hidden and it shouldn't be visible on top navigation anymore. Regarding sidebar: did you tried the code example Ryan posted? It does exactly what you are looking for (I added few comments): <?php echo "<ul id='portfolio_list'>"; $items = $pages->get('/portfolio/')->children("limit=6"); // Here we take children of portfolio page (limit=6) foreach($items as $item) { //Loop through them $thumb = $item->image->size(150, 200); // Small image from each, optional. Assuming that template that your portfolio children pages use have a field called "image" echo "<li><a href='{$item->url}'><img src='{$thumb->url}' alt='{$thumb->description}'>"; // If you don't use image there, then remove img tag here echo "{$item->title}<br />{$thumb->description}</a></li>"; } echo "</ul>"; -
Sounds great Nico!
-
This seems like a very interesting module. Does it currently post for the user that is logged in, or is it possible to post for some "Facebook page" wall? Meaning that if I manage cocacola.com site is it possible to post to cocacola facebook wall instead of my personal fb-account?
-
Yep. What Adam wrote is pretty close what we have done. But we have different branches also covered: /non-accessible/ ./P21dev/wire/ ./P21stable/wire/ ./P21latest/wire/ ./modules/modulename/ We took the "automagic" little further: we have used Apache virtualdocumentroot (http://httpd.apache....hosts/mass.html) and some simple mod_rewrite to automatically serve sites from right directory. So no need to manage vhosts etc when adding new sites. We also use our dev domain (pwire.fi) to serve sites before dns-changes have been made. When I create site www.domain.com then it is right away accessible from www.domain.com.pwire.fi.
-
I am all in for 5.3 requirement. Not sure what version of php most of the hosting companies are offering at the moment though...
-
If everyone wants to hide that, then it would be better gone forever! :'(
-
On frontpage of the forum there is "Recent topics". I don't like that and it doesn't stay away even if I click it away. Does others use it? I found it confusing since it does show the topic starter photo - not the latest who replied.
-
Hi Will and welcome to the forums. ProcessWire will scale very well in that kind of usage. You can easily build multiple categories, subcategories etc. There is no limits for how many categories you can have or how many terms there will be. You can also freely define what metadata each term has (common name, scientific name, alternate name etc).
-
Haha - I actually have a green hat, pretty similar to that. My wife doesn't let me wear it though
-
It let's people use Gravatar for avatars, which is nice. I didn't need to upload any images.
-
It's up! I was worried to lose my sleep tonight Thanks for putting this up Pete and Ryan! Looks and feels great.
-
http://processwire.com/api/variables/config/ You probably need these: <?php $config->httpHost $config->https Of course everything what you get from PHP is also available: http://www.php.net/manual/en/reserved.variables.server.php
-
Ryan, you are right. I was thinking that when you input content this way, you would save it to the database in more relational manner (not just a bunch of markup, but more metadata about images used, how they are positioned etc). But even if you would do that, it doesn't resolve the problem that whenever image is removed, you need to check all the content fields if that image is used. So similar solution (putting images and fields where they are used to db table) is needed anyways.
-
One solution in the long run could be some totally different way to manage text & images content. Maybe something like MadMimi Newsletter has: https://madmimi.com/tour/create_send (video on top right).
-
Progress on ProcessWire 2.2 and overview of multi-language support
apeisa replied to ryan's topic in Multi-Language Support
Absolutely brilliant stuff Ryan! -
It is possible, but not sure if I want to go there...