-
Posts
377 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Craig
-
What about doing the same tasks using incognito mode - does it result in the same behaviour? Do you have any active extensions that are messing with the User Agent string?
- 12 replies
-
- 2
-
- Developer Tools
- Chrome
-
(and 1 more)
Tagged with:
-
Hi teo74, welcome to the forum You are sort of there with InputfieldPageListSelectMultiple - but alone, that is just one method of providing the visual input part of what you need. What you need is the Page fieldtype, which will give you the option of using Page List Select inputs, amongst others, in the backend. The Fieldtype is how the data is stored, formatted and linked internally, and the Inputfield is how this field is presented and manipulated in the backend by a user. Have a look at this video - Using the Page Fieldtype - to get an idea of how it all works. In summary: Create a new field (called 'related', perhaps?) using the Page fieldtype. Configure it for the types of pages you want to select, and how you want the selector to look (which Inputfield to use) Add it to the template where you want to choose related pages. Edit those pages and choose the related pages In those pages, you can get the related ones, and display the links, by doing something like this in the template code: <ul> <?php foreach ($page->related as $relatedPage) { echo "<li><a href='{$relatedPage->url}'>{$relatedPage->title}</a></li>"; } ?> </ul>
-
This looks amazing! Thanks very much for putting this together I don't have the Open Sans font installed locally. Would you be able to change to a stack that includes fallback to other Sans fonts, or include the webfont? At the moment it's a very unattractive Times
-
That sounds good. Feel free to check out our website, and maybe send over some details about this project using the hello email address on the site? Ideally we'd like to find out more about the following information to decide if we'd be able to do the work and offer a quote: Timeline Budget Requirements and responsibilities Current project stage
-
Hi Redhat, Are you wanting to pull properties from Vebra to display on a ProcessWire website; or are you submitting properties from a ProcessWire website into Vebra? Where are you based? My company has worked with ADFv3 BLM feeds for RightMove and Zoopla in the past (not a PW site though), and of course ProcessWire.
-
Could you try making your PJAX calls include the trailing slash at the end of the PW URL parameter and before the query string? E.g. http://www.juleslister.co.uk/projects/photography/?_pjax=%23pjax
- 3 replies
-
- ajax
- javascript
-
(and 2 more)
Tagged with:
-
At the moment, the sites I build with PW can be quite different and front-end approach seems to evolve all the time. I build professionally and personally/for fun, and I mostly do projects the same way. I typically start with the latest dev branch, blank/default profile, install at least AIOM, and possibly CroppableImage if images are a main focus for the site. Then I'll typically look at how I structured the most recent couple of projects. I'll borrow most of the _init.php code, nav/general helper code, and the base HTML structure for the _main.php template. I'm up and running fairly quickly and ready to start front-end, or delve into template & field setup. It works OK for me, and is probably more efficient than me getting a profile "just right" that I could start from. And then there's keeping that up-to-date with the latest PW dev, modules, and any useful reusable code developed per-project - I don't think I would personally gain anything from doing that!
-
Using Processwire with Open Cart (or other applications)
Craig replied to icreation's topic in API & Templates
OpenCart defines several constants to various different paths (although not one for the "root" directory it seems), which you may find useful for this. You can see these if you open up config.php. Choose one, and use it in your template. For example, this might work: require_once(DIR_SYSTEM . "../processwire/index.php");- 11 replies
-
- developer api
- other applications
-
(and 1 more)
Tagged with:
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
Craig replied to David Karich's topic in Modules/Plugins
I've encountered an interesting problem when using AIOM recently - but also have a potential fix, so it's not all bad. Here's the information! I am using separate IE and non-IE stylesheets, with each loaded via conditional comments in the markup. There are two arrays for the files: $config->css->all = array( 'css/pure-min.css', 'css/grids-responsive-min.css', 'css/fa/css/font-awesome.min.css', 'css/cds-all.css', ); $config->css->oldie = array( 'css/pure-min.css', 'css/grids-responsive-old-ie-min.css', 'css/fa/css/font-awesome.min.css', 'css/cds-oldie.css', ); These get minified in the template: <!--[if lte IE 8]> <link rel="stylesheet" type="text/css" href="<?php echo AIOM::CSS($config->css->oldie); ?>"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--> <link rel="stylesheet" type="text/css" href="<?php echo AIOM::CSS($config->css->all); ?>"> <!--<![endif]-->That is all great. The problem arises when the source files all have the same modification time - which it does on the live environment of this website, and when using an automated deployment service.Because each list of files has the same number of files, and the files have the same modification time, the generated cache name is always the same, and one overwrites the other. My fix was to include the file's paths when generating the cache name in _getCacheName: foreach ($files as $file) { $_timestamp .= $file['absolute_path'] . $file['last_modified']; } I'm more than happy to create a pull request on GitHub for this, but thought it'd be worth mentioning/discussing first -
LostKobrakai: I experienced that too (on two separate computers where I regularly access PW forums) - but it seems to have "fixed itself" now (I think!)
-
It looks like LinkedIn use OAuth for this process, just like Facebook and Twitter and GitHub. There are ProcessWire modules that handle those networks: Facebook (in modules directory) Twitter (my module: Thread, GitHub) GitHub (Repo) I would start by looking at those, learning how they work, and then building one for LinkedIn that meets your needs
-
This is a great idea, and I've tried to register too. But I have also received an error, "There was an error processing your details. Please try again." I always remember just using Twitter to register/sign in to the forums, but I did go into the settings and reset my password using what I thought it was. But I still can't seem to get on I have logged out and back in - using Twitter - as it seems I can't use my password to sign in. Anything else I can do?
-
In a previous life I used to do IT support in a school, and I was responsible for a Zimbra install there. For them, it was (and still is) a very good and capable system. Different settings for staff/students, external access, IMAP for mobile users, LDAP integration, the works. The management features and API are robust and featureful. To an extent, it's very customisable. From the time I implemented it, (around 2008) its ownership has changed hands several times but has gone from strength to strength. On the technical side, you will need a server with a lot of resources to run it. It is not a lightweight webmail client like RoundCube or Horde; it is an entire self-contained product that bundles its own SQL server (currently MySQL), mail agent, web application server, antivirus/antispam, logging, monitoring services and more. I'm not sure if it's worth the resource overhead and hassle if it's just going to be 1-2 accounts on a single domain and you are the one maintaining it. But your situation and priorities may be different
-
What a fantastic and well-suited design! And thanks for sharing your challenges with the design and positioning - it certainly wasn't easy to achieve going from your description, but the end result looks brilliant. Well done
-
Pretty much all of my sites have these installed at a minimum: AllInOneMinify FieldtypeCropImage/InputfieldCropImage SessionHandlerDatabase AdminTemplateColumns
-
The module will handle all of that for you
-
Hi gebeer It is designed to work for either back, or front, or both. It's up to you. The main flaw in your testing is using incognito mode. That is a totally separate browser session, with different cookies. So there is no way that logging in with persist, in one browser window will work as you expect it to with incognito. The better way to test it is to delete the ProcessWire session cookie. This will log you out. But then LoginPersist will see the persist cookie is present, and log you back in. The module is designed to remove the persistent cookie when the user actively chooses to log out. The idea behind it is to allow the user to have a persistent login state until they choose to log out. To remain logged in with this, simply do not log out.
-
I like your fifth idea, the "Field Matrix". This is similar to a concept I've played with in my mind at the planning stages of a ProcessWire site, to work out what's needed and where. I've never managed to do it in practice, though, because I tend to just simply have a nested bulleted list of the templates and fields instead (which ends up with a lot of repetition and nowhere near as visually comprehensive as a matrix!) Additionally... while we're here... Duplicate/clone this field/template I feel like this section could do with two lazy-related additions to save clicks: a text box to enter the new name an option to go and edit the new field/template immediately
-
Excuse me, Mr Pirate, is that... Comic Sans?
-
Excellent! You're welcome
-
Ah, yes, that changes things I haven't really used repeaters, but I think this might work - just treat each repeater item like a page: <?php $entries = wire('pages')->find("template=story"); foreach ($entries as $entry) { echo "<br>Checking checkbox on {$entry->title}...<br>"; foreach ($entry->tests as $test) { if ($test->old_check == 1) { $test->of(false); $test->new_check = 1; $test->save(); echo "Converted {$test->scenario}<br>"; } } }
-
This should be pretty easy to do using some code that calls the API <?php $entries = wire('pages')->find("template=entry, old_check=1"); foreach ($entries as $entry) { $entry->of(false); echo "Checking new checkbox on {$entry->title}...<br>"; $entry->new_check = 1; $entry->save(); } The logic is: find all pages that have the old checkbox checked, check the new one, and save the changes. You could put that in a template file, run it once by visiting a page using that template, and then removing the code. Just remember to change the values for template and checkbox fields to reflect the actual ones you use on your site
-
I've seen Load Impact used before. I don't know much more about it, but it's another one to throw into the mix If you're comfortable with command line tools, there is also ApacheBench.
- 4 replies
-
- 1
-
- Performance
- test
-
(and 1 more)
Tagged with:
-
Congratulations, you've just encountered the Baader-Meinhof Phenomenon