Leaderboard
Popular Content
Showing content with the highest reputation on 06/23/2014 in all areas
-
upgrade.php is not a ProcessWire file. I'm guessing maybe it was a leftover from a previous WP or Joomla install? It sounds like it could be related to the exploit you experienced, but be careful not to assume it ends there. ProcessWire's core does not have very many input opportunities on the front-end of your site. Actually, the URL itself is really the only input ProcessWire deals with on the front-end, and that is validated by the htaccess before being sent to PW, and then thoroughly sanitized then validated again by the core. As a result, it's unlikely for ProcessWire itself to be exploited in the same ways that some other CMSs might be, simply because there are a lack of input opportunities to a guest visitor. What ProcessWire does instead is give you an API that lets you control all the aspects of when user input results in something output. If there were to be an exploit on a particular PW site, it would be much more likely to be the result of the code unique to that site, or a 3rd party module, rather than PW itself. If you were dealing with a site that had other software running, either presently or in the past (perhaps WP powering a blog alongside) then it'd be much more likely for that to be the source of the issue than PW. In fairness to WP, most exploits have to do with 3rd party WP plugins or themes and not WP itself. WP and Joomla are also much larger targets than PW, so they are usually broken into with automated scripts rather than actual people sitting at their computer. When you've got a site that you know has been broken into at the filesystem level (like yours might have been), it's unusual for it to be limited to just one file. There are usually backdoors built elsewhere. Even if the site is fixed for the moment, it's good to still think of everything as tainted until proven otherwise. I'm not necessarily a fan of restoring from a backup in this case, unless you know for certain that the backup itself does not contain the exploit. Sometimes a backdoor will be present for months before taken advantage of. If you had Joomla running on this server a long time ago, the exploit may have originated there and simply been hidden somewhere on the file system. The first thing you'd want to do is remove any other software installed on the server that doesn't need to be there–old copies of WP, Joomla, etc., or files leftover by them. If you aren't certain, then just move it to a non web accessible quarantine directory. For your ProcessWire site, you don't need anything in your web root directory except for: /wire/, /site/, /index.php and .htaccess. Remove your entire /wire/ directory and put in a new fresh copy, as well as your /index.php and /.htaccess file. Basically do the same thing you would do if performing an upgrade. In /site/modules/ you may have some 3rd party modules installed. Replace each of the directories in /site/modules/ with fresh copies. This is the same thing you'd do if upgrading those modules. That essentially leaves /site/ and everything in it to analyze. If the hack originated from an automated script targeting DrumlaPress, chances are it left your PW installation alone, but you never know–it might have gone after every single PHP and JS file it could find on the file system. You'll want to look for anything unusual in your /site/templates/*.php files and /site/config.php file. By unusual, I mean anything that you didn't put there. Start by looking at the beginning and ending of each file. Red flags are usually extra <script> statements, base64 function calls, exec function calls, extra JS attributes on markup elements that you didn't put there (like onclick), include or require statements with variable names in them or referencing files you don't recognize. Also consider that new directories may have been introduced anywhere. I would download a copy of your entire /site/ structure and analyze it locally, looking for any extra files or directories that you didn't put there. Also be on the lookout for extra .htaccess files, and give them a close look if you find any. Meaning, you'll need to make sure you are seeing hidden files (those preceded with a period). Compare your /site/ structure to a /site-default/ structure as included with a new copy of PW. Once you've cleaned your /site/ directory or at least verified that it's clean, make a good backup of your site so that you've got a known clean starting point (hopefully). Open a browser to your site with Chrome and go to View > Developer > Developer Tools. Click to the "Network" tab. Reload the page. Look for any offsite requests that you don't recognize. That may reveal something hidden that might still need to be cleaned, but hopefully not. Now click to the "Elements" tab. This shows the post-JS markup of your site. Look for any generated elements that you don't recognize, especially at the end or beginning. This again can reveal extras that have been added into your page by an exploit. Lastly (or maybe firstly?), take a look at your file permissions. If on a shared host, you want to be certain that your files aren't readable or writable to other users on the same server. Especially your /site/config.php file, and your /site/assets/ directory (and everything below). What permissions are ideal here depend on the web host and what type of PHP they are running, so it's best to inquire with them on how you can have files writable to your website that aren't writable by other accounts. Btw, I have never seen or heard of a compromised PW installation, regardless of what other compromised software was running on the server. I have seen plenty of compromised WP installations that had PW running alongside them. Thankfully, the PW installation has always been left alone, with the exploit limited to the WP installation. But it's best to go into these things assuming everything on the server is tainted, so always play it safe.9 points
-
Fixed: Repeaters are excluded from unpublished pages that render in modal window. Changes commited.4 points
-
I'm wondering if it would be worthwhile wrapping that declaration in another check, inside the current mod_rewrite check? <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule>4 points
-
The quick answer, Regardless of the hack, if you are using shared, VPS or even dedicated server hosting, even ProcessWire can be affected. If the site that you manage is using the same user account and/or on the same virtual/physical server as a compromised WordPress or Joomla site, any compromise can indeed affect the ProcessWire installation. If there are no old/new WordPress or Joomla installations under the situations I described and you are having this problem, then yes there may be an issue with ProcessWire. Please let us know if this is the case, however I doubt if it is, since we would have already seen this occur in other ProcessWire installations worldwide. PHARMA is an old hack, but it doesn't mean it hasn't been updated. Either way, you need to work with the security team at your webhost to identify and mitigate any issues. Please keep us informed on your progress clearing this issue up. Best Regards, Charles3 points
-
Here are some API additions to the dev branch, primarily for WireArray/PageArray/etc. I've found these very handy lately, and would have on almost any project I worked on, so decided they'd add value to the core. I'll add these to the cheatsheet once 2.4 replaces 2.3, but for now, here they are. The examples here use PageArray, but note that these API additions apply to any WireArray derived type, not just PageArray. WireArray::implode() Implode all elements to a delimiter-separated string containing the given property from each item. Similar to PHP's implode() function. Usage: $string = $items->implode([$delimiter], $property, [$options]); Arguments: $delimiter - The delimiter to separate each item by (or the glue to tie them together). May be omitted if not needed $property - The property to retrieve from each item (i.e. "title"), or a function that returns the value to store. If a function/closure is provided it is given the $item (argument 1) and the $key (argument 2), and it should return the value (string) to use. [$options] - This argument is optional. When used, it's an array with modifiers to the behavior: skipEmpty: Whether empty items should be skipped (default=true) prepend: String to prepend to result. Ignored if result is blank. append: String to prepend to result. Ignored if result is blank. Examples: $items = $pages->find("template=basic-page"); // render all the titles, each separated by a <br>, for each page in $items echo $items->implode('<br>', 'title'); // render an unordered list of each item's title echo "<ul><li>"; echo $items->implode('</li><li>', 'title'); echo "</li></ul>"; // same as above, but using prepend/append options, // this ensures no list generated when $items is empty echo $items->implode('</li><li>', 'title', array( 'prepend' => '<ul><li>', 'append' => '</li></ul>' )); // same as above, but with all items now presented as links // this demonstrates use of $property as a function. note that // we are also omitting the delimiter here as well, since we don't need it echo $items->implode(function($item) { return "<li><a href='$item->url'>$item->title</a></li>"; }, array('prepend' => '<ul>', 'append' => '</ul>')); WireArray::explode() Return a plain array of the requested property from each item. Similar to PHP's explode() function. The returned PHP array uses the same keys as the original WireArray (if that matters). Usage: $array = $items->explode($property); Arguments: $property - The name of the property (string) to have in each array element (i.e. "title"). You may also provide a function/closure here that should return the value to store. When a function/closure is used it receives the $item as the first argument and the $key (if needed) as the second. Examples: // get an array containing the 'title' of each page $array = $items->explode('title'); // get an array containing the id, url and title of each page $array = $items->explode(function($item) { return array( 'id' => $item->id, 'url' => $item->url, 'title' => $item->title ); }); WireArray::data() Store or retrieve an arbitrary/extra data value in this WireArray. This is exactly the same thing that it is jQuery. I've personally found this useful when building search engines: the search engine can store extra meta data of what was searched for as a data() property. Then any other functions receiving the WireArray/PageArray have access to this additional info. For example, the search engine portion of your site could populate an array of summary data about what was searched for, and the render/output code could render it to the user. Usage: // Setting data $items->data('key', 'value'); // Getting data $value = $items->data('key'); // Get array (indexed by key) of all data $values = $items->data(); Arguments: The above usage section explains all that's needed to know about the arguments. The only additional comments I'd make are that 'key' should always be a string, and 'value' can be anything you want it to be. Example: function findSkyscrapers() { $floors = (int) wire('input')->get->floors; $year = (int) wire('input')->get->year; $items = wire('pages')->find("template=skyscraper, floors=$floors, year=$year"); $items->data('summary', array( 'Number of floors' => $floors, 'Year constructed' => $year )); return $items; } // the render function can focus purely on output function renderSkyscrapers($items) { echo "<h2>You searched for:</h2>"; // render the summary of what was searched for foreach($items->data('summary') as $label => $value) { echo "<p>$label: $value</p>"; } echo "<h3>Skyscrapers found:</h3>"; // note use of new implode() function, though a foreach() would be just as well here echo $items->implode(function($item) { return "<p><a href='$item->url'>$item->title</a></p>"; }); } WireArray::and() WireData::and() Return a new copy of the WireArray with the given item(s) appended. Primarily as a syntax convenience for various situations. This is similar to jQuery's add() and andSelf() functions, but I've always felt "add" implied adding something to the original rather than creating a new combination, so went with "and" in this case. The term "and" is actually a reserved word in PHP, so you can't usually have a function named "and()", but through the magic of hooks, ProcessWire can. This function should reduce the instances in which you'd need to do "$a = new PageArray();" for example. Usage: // create a new WireArray with $items and $item (appended) $myItems = $items->and($item); // create a new WireArray with $items and $moreItems (appended) $myItems = $items->and($moreItems); // create a new WireArray with $items and $item (prepended) $myItems = $item->and($items); // create a new WireArray with $item and $anotherItem (appended) $myItems = $item->and($anotherItem); // create a new WireArray 4 items $family = $pappa->and($mamma)->and($brother)->and($sister); Examples: // generate breadcrumb trail that includes current page foreach($page->parents->and($page) as $item) { echo "<a href='$item->url'>$item->title</a> / "; } // check if page or its children has a featured checkbox if($page->and($page->children)->has("featured=1")) { echo "<p>Featured!</p>"; }2 points
-
Greetings Recently uploaded my first site made within the amazing walls of ProcessWire. It's a very simple, yet professional, site for an accounting, tax, and business consultancy in Limbe, Cameroon. The site uses well-built templates (especially on the backend - I really love the way everything works with the editing pages on a per-template basis), and a custom module for the contact form, which runs a clear and concise validation service, powered by the respective Illuminate components (yes, I had to mingle Composer into the scene). Looking forward to many more sites in PW - as it is, I have three more to upload by the end of July. Hope you like it - feedback is always welcome. www.aegpartners-cm.com2 points
-
Wow, very thorough instructions Ryan. As you say it's unlikely PW will be exploited in a DrumlaPress manner, but still, this is a really great writeup largely relevant to cleaning any hacked website. Should perhaps be pinned?2 points
-
Hey horst, thanks for catching that up! I'll fix it... It's hard sometimes to spot every bug when you change something in the css (because you have to check it throughout the system...). Now I'm going to prepare for today's football match against Mexico (I hope we'll go to the second round )2 points
-
New updates to the theme - I've added a counter next to username that counts unpublished pages and shows them in modal window. Check out the first post for changelog.2 points
-
@peterfoeng: this is great. I have seen that you already sent a pull request that should solve one or two issues. (I haven't tried it yet) The development and maintaining of this is open to all but write access to the repo should be limited to few people only I think. In the past Owzim and I have successfully and efficiently colaborated on some enhancements to the thumbnails module and he has good skills in js and css. Therefor I really would like if he join in here. Regardless of this, any help and contribution is highly appreciated. The best way to go, (I think), would be to do this for the current module: - PullRequest from PeterFoeng And after that we should start a fork with: 1) creating the clear naming convention for this module, like Antti has suggested (and Owzim). 2) Actually pending is an enhancement to the images naming scheme that supports custom-suffixes and assistant method(s) to use that. After we know how it is finally implemented in Pageimage we will use this in the new fork of Thumbnails module. That allows us to strip out hooks and code for deleting variations. (this is delegated to the core pageimage by the custom-suffixes) 3) Also pending is an enhancement to the imagesizer that allow a "crop before resize" manipulation with individual and exact coordinates. (The default behave is first resize and crop after) With this supported, the thumbnails module can delegate the complete imagemanipulation to the ImageSizer. This will allow to further deleagte it to any dropped in PageimageSizerModule without any additional interaction. If you decide to use another image rendering engine (currently only the PageimageSizerImagick is available) you simply install this and it will work for all image variations, regardless if they are requested by the core Imagesizer or by the thumbnails module or by any other future third party module. fixing known issues: 4) I have tried to use the settings with 0, but it doesn't work for me with height set to 0. I tried these settings: thumb1, 0, 200 thumb2, 200, 0 The first works as expected, the second doesn't. It always displays the full image and when I open the crop-page I do not get an Rectangle. 5) When setup thumbs bound to templates, uploading a new image to a site with one of these templates creates also variations that are only bound to other templates 6) When upscaling is set to false in the config.php, it isn't respected by the CropRectangle. For example if there is a setting 200,300 and upscaling is set to false, the rectangle should not go smaller than 200x300, because if a smaller rectangle is allowed, the resulting image would need to be upscaled, what isn't allowed! Make the CropRectangle respect / reflect this. After these steps we should try to implement some of the requests already posted here: - thumbnails admin Grid View - support for Retina Variation @2x - copy cropped variation to other field(s) / using it within RTEs - and others that I haven't recognized yet2 points
-
julienmarie: I think Pagefile:install is not triggered with files added from the admin and that was my major concern. Yes, go ahead, fork it and let's create a better module!2 points
-
Hi Dave they've installed php 5.4 as standard since then I have that error. Now solved it by uncommenting # SetEnv HTTP_MOD_REWRITE On hope that does not cause any other problems2 points
-
What's the output for the url? $config->urls->root should be "/" if processwire isn't installed in a subdirectory, so maybe you just missed the third slash after the "http://". If you want to get the domain name I think you have to use $config->httpHost. But you could simply use a relative url instead.2 points
-
Hello! About the same time Hari KT asked about "Remember Me" functionality, I identified this as a feature I wanted to implement in some sites under development. Having done this twice before (in CodeIgniter) and based on previous research, I decided to build a ProcessWire module to provide this feature. So far, I have developed and tested this on ProcessWire 2.3. I would welcome any feedback, comments, suggestions and problems from people who are keen to use this. To re-iterate the readme, this module allows users to remain logged in across browser sessions. The module can operate in two ways:Automatically. No code changes, but users do not have a choice. Manually. The module must be called from a site's custom code. Options can be changed in the module configuration page. Enable fingerprinting (IP address and User Agent) as an additional security check. Limit the persistent login functionality by role. Set the name and age of the cookie. Sets an identifier in the session when a user is logged in via a persistent login cookie. This should be used to control access to sensitive information and actions within a site's custom code. Clears login tokens when a potential theft has been identified. Updated: LoginPersist on GitHub1 point
-
Hello. I wish to publish some processwire pages to facebook, including images. I got it working thanks to adrian and Martijn using ifttt, but I would like to use my own code and publish images or other stuff through the facebook php sdk. At the moment I've created a simple php page in my localhost that works, here is the code <?php include_once 'inc/facebook.php'; $appId = '703738********'; $secret = 'd30530a5dcd*************'; $returnurl = 'http://myweb.es/facebook/post.php'; $permissions = 'manage_pages, publish_stream'; $fb = new Facebook(array('appId'=>$appId, 'secret'=>$secret)); $fbuser = $fb->getUser(); if($fbuser){ try{ $message = array( 'message' => 'foo' ); $result = $fb->api('/me/feed/','POST',$message); if($result){ echo 'Published'; } }catch(FacebookApiException $e){ echo $e->getMessage(); } }else{ $fbloginurl = $fb->getLoginUrl(array('redirect-uri'=>$returnurl, 'scope'=>$permissions)); echo '<a href="'.$fbloginurl.'">Login with Facebook</a>'; } ?> but when I try it on a pw template or module it doesn't work $this->pages->addHookAfter('save', $this, 'fb'); ..... if($page->facebook==1) { include_once 'fb/facebook.php'; $appId = '70373825******'; $secret = 'd30530a5dcd4e5829e6c8b********'; // $returnurl = 'http://indinet.es/facebook/post.php'; $returnurl = 'http://pwpage.com'; $permissions = 'manage_pages, publish_stream'; $fb = new Facebook(array('appId'=>$appId, 'secret'=>$secret)); $fbuser = $fb->getUser(); $this->message("user " . $fbuser); } // facebook .... any ideas?1 point
-
I have build another non-profit website http://www.fmgcs.com with ProcessWire 2.4 completely free! This my community website which I redesigned and hookup with ProcessWire. Before it was static html pages. I have spent quit a bit of time on designing and customizing templates. Please provide your feedback as you normally do. Thank you!1 point
-
I'm starting this topic for a problem I see with the German translations of relative times. But other languages may be affected as well. You can see the problem when the Lister module shows a column with a past date. In English it says "3 years ago" and in German it's translated to "3 Jahre vor". But it really should be "vor 3 Jahren". The phrase is constructed with the single translations of "years" and "ago" in the same order as it is in English. So the problem is about grammar and word order in the German translation. Maybe it could be solved by a list of translatable phrases with placeholders, so that it looks like "%d years ago" or in German "vor %d Jahren". That is just a quick thought and it probably should be discussed here before it is posted as an issue on github.1 point
-
Hi altogether, since I am currently working on a project that has (hopefully) the potential to reach a certain level of complexity at some point, I wanted to start the template structure in a scalable and "proper" way. In the following I'll try to give a summary about the approach I'm testing: 1. Directory structure inside site/templates/ /controllers/ /views/ 2. Create init file named... site/templates/init.php...containing (for example): <?php function getPartial($name, $allpages) { // Site wide $settings = $allpages->get('/meta/settings'); $root = $allpages->get('/'); // User related $loggedInUser = wire('user')->isLoggedin(); // Page related $title = wire('page')->title; $children = wire('page')->children; $template = wire('page')->template; include($config->urls->templates . 'controllers/' . $name . '.php'); include($config->urls->templates . 'views/' . $name . '.php'); } 3. Uncommenting prepandTemplatefile in /site/config $config->prependTemplateFile = 'init.php'; 4. Creation of partial (controller and view) in their respective folders /site/templates/controllers/test-partial.php /site/templates/views/test-partial.php Example controller: <?php $homepagetitle = $root->title; Example view: <h1><?= $homepagetitle ?></h1> <p><?= $title ?></p> 5. Creation of layout file. I tried to put these in a folder called /layouts, but that does results in PW not finding new templates anymore in the PW Admin when creating a new templates. Any ideas? Changing index.php's $config->urls->templates ? Example layout: <html> <head> <title>Foo</title> </head> <body> <?php getPartial('test-partial', $pages); ?> </body> </html> So, for some reason I have to explicitly inject $pages or wire('pages') into getPartial() - but I have no idea why, since $page or wire('page') is working without problems in the functions scope. But: The output is just as intended. The title of the root page in a h1 headline, and the title of the page using this "layout" in a paragraph. Any feedback or pointing to pitfalls of this approach would be highly appreciated Best, marcus edit: Funny, essentially this is a very stripped down way of Template Data Providers, which needed Twig the last time I tried to use it.1 point
-
Brilliant; 3 days later i have full functionallity... login using ryan's script https://processwire....tor-login-form/ page edit using soma's modal trick https://processwire.com/talk/topic/2382-processwire-setup-and-front-end-editing-made-easy/ access control via http://modules.proce...-edit-per-user/ module and some cool table editing via profields table https://processwire.com/api/modules/profields/table/ 3 days with just a couple of hours a day..1 point
-
Greetings ProcessWire community! Ahhh, the first magic post in a new forum... This should be something meaningfull, yet this is just a question from a newborn webguy from germany. After all the fighting with overblown CMS systems I found this promising beauty! I use XAMPP on a local system to get used to new tools. So I installed ProcessWire without problems. After that all the links are throwing me back to the XAMPP startpage. Example: "http://localhost/!soulsliverCMS/processwire" Throws me back to: "localhost/xampp/" Is there some config.php stuff I have to change for it to work in my local environment? greetings Soulsliver1 point
-
It sounds like ProcessWire will be a perfect fit for you. It does genuinely do what you are looking for. It is a tool you can use how you see fit. It does not dictate how you should work. In terms of organising fields. If you click on the "advanced" tab on a field page you can apply a tag. This tag will help organize the fields. (Also applies for templates)1 point
-
Hey kongondo, thanks for the warm welcome! Well after my monumental battle with CMS systems over the last years I´m kind off tired... I watched the internet growing and was part of the flash generation (great new tool! let´s make a 12 MB site intro!). Over the last decade CMS systems took more and more control out of my hands. terrorizing me with cryptic fancy new script languages, overblown backends and a standard CSS file for a template with thousands of lines that I had to pull painstakingly apart over hours and hours to find the elements that I am looking for... well enough of this! As I see it Processwire gives me exactly what I want! A simple and structured Database Editor in a nice environment where I alone can push and pull all the triggers I want! So yes! If this CMS does what I think it does I will enjoy the hell out of it!!! From the first look I just hope it will expand and grow over time. The fields for example could use a folder structure just for the backend to prevent massive lists. For example create a folder "home" where all of the fields for home go into. Or a folder "core" where all global used fields go. greetings Soulsliver PS: Please excuse my guerilla english! I´m a little rusty on that. Need a refreshment course!1 point
-
Just found a video where Louis CK is telling about people in the context of Cell Phones and Flying. Instantly I thought about Open source. vid on vimeo1 point
-
You only need to remove one of these, the first one if your ProcessWire installation is not installed to a subdirectory (""http://domain.com/processwire/".1 point
-
@onjegolders & Craig A Rodway Thanks guys! It was indeed the exclamation mark "!" that caused the trouble. I start new projects with a "!" at start of the foldername to bring them to the top on this loooong list of projects. And normaly I never had issues with it. "RewriteBase /!soulsliverCMS/processwire/" did not solve this problem so I renamed the folder to "soulsliver", flushed the database and reinstalled ProcessWire. It´s working fine now. Thanks again for the help! greetings Soulsliver1 point
-
1 point
-
I would create a new template with Page field which could be used for those pages. For example: New template: link Fields: title, link New field: link Type: Page Input: PageListSelect When creating custom page links in your page tree, just use the "link" field to browse to the destination page. You will then be able to access the destination page in the code: <?php $children = wire('pages')->children(); foreach ($children as $child) { $url = $child->url; $title = $child->title; if ($child->template->name == 'link' && $child->link->id) { // Access the "link" field on the child page to get the destination page. $url = $child->link->url; // Optional: use the linked page's title? You decide! $title = $child->link->title; } echo "<a href='$url'>$title</a>"; } ?> Using this method, you could even add a URL text field to the template if you wanted to link to places offsite as well.1 point
-
For you - it's Nico There is a file called ".htaccess" in your root folder (the folder PW lays in). In this file you probably have to remove the # next to the "RewriteBase path".1 point
-
That SetEnv line is only used by the installer to determine if mod_rewrite might be inactive. It is totally fine to remove it. Great suggestion by Craig to wrap it in the IfModule block–I will add that.1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Thanks for this Charles. It does indeed seem that the situation is what you've described in your post. The client's site is hosted on a shared hosting package and I'm assuming some other site has been compromised. I identified the problem as a single php file, "upgrade.php" that was in the root public_html folder, was around 6k. I deleted this and it seems to have fixed the problem. I'm assuming from this that it's not an issue with ProcessWire, as I know the WP/Joomla exploits inject code into locations/files specific to those installations. I'll keep an eye on it to make sure it doesn't return, and will get in touch with the webhost. Thanks again.1 point
-
It's free and if there are limitations, there never affected my "recipes". They only disable ones, which throw to much errors. (Edit: limitations in form of quantity of triggers/time) I think they only add channels by themself. There is a "email" channel. So you could send emails to "trigger@ifttt.com" but right now I've no idea how they identify, that this mail is for you, maybe the senders mail has to be created as "channel". you could even fire different events of of differerent hash-tags inside the mail. The other option would be to create a RSS feed, which could trigger actions. Edit: Damn, just read it another time, you mean to trigger an action in ProcessWire, not the action being the email send. That's where the limitations of ifttt come into play. It's concept is more geared towards the user / one of his different internet accounts being the recipient of the action. I played around it a little bit, with saving my favorites from my 500px account to my box account. The official channel doesn't provide this function, and I wouldn't get the biggest size, the images are available. So I created a php script, which logs me in, to get access to all pictures and not only the not hidden ones. Then it parses the page, which it gets from the ifttt rss channel, to get the right image. The script url replaces the "image url" which a get value of the disired image, which should be uploaded to box. But that's still quite hacky and doesn't work very well.1 point
-
I think the contact-form from a content point of view is okey, but for me I scrolled a few times down from the top, and ended exactly so that I just didn't see the big textfield. So maybe a classic select dropdown for industry and service would be better. It makes the form less long and doesn't loose any functionality. The styling as it is right now even reminds me more of a multiple select field, but it's just single select. The detailed placeholder texts for the "optional" fields make them visually more important, than the required fields, at least for me. I would suggest to add placeholder text to the two inputs above as well. From a visual standpoint, maybe make the background of the optional fields slightly gray, or add something of color to the required ones. Maybe the classic "*" for required. As it is, you have to look very closely to distinguish between required and optional fields Another thing that bugs me, is that the logo isn't linked to the homepage. I can see the standpoint, that there is a "home" link in the navigation, but still, the logo should always be linked to the startpage in my mind. I even read it in some tutorial these days.1 point
-
Hello community, i´m proud to tell you that my first website with processwire is online Even though I have not necessarily chosen the easiest project for me ... it was/is a great joy to work with processwire and I´m very glad to have discovered this great system and this very helpful community, thanks that I could be a part of it! Now to the page: It is a Trakehner horse breeding farm in southern Germany. www.trakehnerhof-st-vitus.de The basic system is based on the site template by Martijn (here again many THANKS Martijn). It is supplemented by a responsive Design with bootstrap, meanmenu, nivo-slider, magnific-popup and some css stuff. To import more than 500 individual horse sites, the CSV import module helped me a lot. By some Excel magic in the run-up and then a clean csv file the import to processwire was very easy! Installed Modules: - Image cropping tool - Get Video Thumbnails - ProcessImageMinimize - Piwik Analytics - MinifyHTML just to name a few ... So what do you say? Would you buy a horse1 point
-
1 point
-
Very useful piece of code indeed, thank you! It kind of goes haywire if $itemsInColumn is uneven though. Using ceil($num / $columns); instead of intval($num / $columns); fixed it for me! cheers phil1 point
-
Yes I changed to 1 minute but no results. My original idea was to publish some stuff to facebook wall after saving a page in the admin area, title, description and images. I got and external php that does exactly that and works: <?php include_once 'inc/facebook.php'; $appId = '703738********'; $secret = 'd30530a5dcd*************'; $returnurl = 'http://myweb.es/facebook/post.php'; $permissions = 'manage_pages, publish_stream'; $fb = new Facebook(array('appId'=>$appId, 'secret'=>$secret)); $fbuser = $fb->getUser(); if($fbuser){ try{ $message = array( 'message' => 'foo' ); $result = $fb->api('/me/feed/','POST',$message); if($result){ echo 'Published'; } }catch(FacebookApiException $e){ echo $e->getMessage(); } }else{ $fbloginurl = $fb->getLoginUrl(array('redirect-uri'=>$returnurl, 'scope'=>$permissions)); echo '<a href="'.$fbloginurl.'">Login with Facebook</a>'; } ?> I'm trying to implement that in a hook, there is a checkbox, if is on then publish to facebook $this->pages->addHookAfter('save', $this, 'fb'); ..... if($page->facebook==1) { include_once 'fb/facebook.php'; $appId = '70373825******'; $secret = 'd30530a5dcd4e5829e6c8b********'; // $returnurl = 'http://indinet.es/facebook/post.php'; $returnurl = 'http://pwpage.com'; $permissions = 'manage_pages, publish_stream'; $fb = new Facebook(array('appId'=>$appId, 'secret'=>$secret)); $fbuser = $fb->getUser(); $this->message("user " . $fbuser); } // facebook .... I'm trying first to check the user id, but the result is just 0, whereas in the original file outside pw I get the user id without problems. Any ideas, Why?1 point
-
That should not a problem I guess. What about the time to live? If you didn't set it, it is an hour. ( 60 minutes)1 point
-
For the record, that issue is out now – Screenguide No. 22. Should be available at larger news stands (usually not in small towns, though), especially those at larger trains stations.1 point
-
Two new small sites, both powered by PW 2.4. Both of them in German only (sorry, people who can't read German), HTML5 and responsive. Both kind of simple in design (per request). http://www.eutin-immobilien.de is a site for a local real-estate agent (in a very small town). Content's become a bit weird since the client started to manage it himself because he used the wrong image formats here and there and also decided to skip my advice to keep the headlines short. Nothing much I can do about that; at some point, you just got to let it go. (I'm not a huge fan of limiting the number of characters there.) http://clic-deutschland.de is for a small, but expanding association which … well, I guess it's best described as a network of support groups for addiction. Kind of like AA, but with a different approach. Especially challenging since they have extremely weird needs in terms of the date formats for their events. Excellent example of how to use the GoogleMap marker module with a jQuery plugin to make it really easy for editors to add individual maps for directions. (The latter was originally requested as a Wordpress site. I suggested PW instead, and the main editor is so impressed by PW that she's considering it for the next relaunch of her own web site.)1 point
-
I'm starting to think we should replace the Skyscrapers demo with this Pirates version. Although personally, I like ryan's original piratey voiceovers.1 point
-
Just wanted to mention it also here that all front-end login code posted mostly in this forum has one flaw. The problem is with the login throttle that once it's kicking in, you'll get an WireException thrown and interrupt your login as you will only see this error and nothing else. There's a thread where this was asked and the solution is to use a try/catch to perform the login, this way you can catch the error message and output it where you want it. Looks like this try { $u = $session->login($username, $password); if($u && $u->id){ // user logged in do something $session->redirect("/profil/"); } else { $errors .= "Login failed."; } } catch(WireException $e){ // in case of multiple false login (throttle login) $errors .= $e->getMessage(); // get the error message } There was a mention here https://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?p=505011 point
-
I figured it out. It was a conflict with the Page List Image Label module. It's an older version so Soma may have fixed this already. I'll try upgrading it.1 point
-
I don't know the drawbacks of this, but I just managed to do make the dynamic stylesheet proposed on css tricks work has a pw template. So, this is how to do it (someone stop me if this is a bad bad thing to do): 1. Create a template file css.php and put all your css code inside. On the top of the file put this code <?php header("Content-type: text/css"); ?>. 2. Create a "css" PW template with that file. 3. Create a "css" page and give it the "css" template. 4. Link to the stylesheet like this <link rel="stylesheet" href="<?php echo $pages->get('/css/')->url; ?>">. 5. use the PW API on your stylesheet Extra: 6. put some fields on the "css" template and use them on your css Examples: the color picker field for colors; an image field with your style pictures (background, logo, etc). edit: onjegolders was faster! edit2: not the same answer. Mine is more interesting1 point