-
Posts
4,054 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
Thanks - I've not really used instanceof before but I remember reading about it somewhere else on the forums and I'm never quite sure of the best way to check for a non-existent page so it's handy to know that (and I'll make a note of it this time ).
-
I suppose it's possible it cached some information, but if you uninstalled it and reinstalled it and the error went away then that's the solution. Doesn't matter if it skips a few number in the module ID when you do this - it'll just be the auto-increment value in the modules table in the database I suspect.
-
The ProcessWire equivalent of the suggested code that I just added to StrategyCore is: <meta name="generator" content="ProcessWire <?php echo $config->version ; ?>" /> <!-- This website is powered by ProcessWire ProcessWire is a free open source Content Management System created by Ryan Cramer and licensed under the GNU/GPL. ProcessWire is copyright <?php echo date('Y', time()); ?> by Ryan Cramer. Modules are copyright of their respective owners. More information can be found at http://www.processwire.com --> There's a bit of PHP in there to always show the latest PW version that's running, as well as the current year in the copyright line. @ryan - would you suggest any changes to that?
-
That definitely makes sense ryan. If it's an automated check it might be an idea to check for the default /proecsswire directory too just in case it's not in the template?
-
The latest post wouldn't make much sense though - if you've not read all the posts in between the time you read the last post in a topic to the latest one it would be a bit confusing. Plus, in a lot of the general help type topics, the last post would be variations on "thanks"
-
Good idea Marion! It definitely ensures some credit where visible credit can't be given. I also know from personal experience that this less visible method will still attract other developers as when I see a really nice site and want to know what CMS it was made with I always take a peek at the source code
-
Just store them in a separate something.php file in the templates folder and then in your head.inc file at the top include it like this: <?php include ('./something.php'); ?>
-
-
As for actually checking against and creating an account, you could adapt something like this (note this won't work out of the box, it's just copied and pasted from something on one of my sites): public function checkUser($forumUser) { // forumUser should be an array of: array('uid' => [integer], 'name' => [string]) $u = wire('pages')->get("template=user, user_member_id={$forumUser['uid']}, include=all"); if (!$u->name) { $u = new User(); $u->name = $forumUser['name']; $u->user_name = $forumUser['name']; $u->user_member_id = $forumUser['uid']; $u->addRole("guest"); $u->save(); } return $u; } You could adapt the above to check for a user with a certain name and whatever unique identifier the social networking login methods give you. I'd personally store that identifier in a field in the users template along with a field to store which social network it was - that way you don't run into issues with people from multiple networks having the same username and not being logged in. As usual, there's lots to consider but hopefully that's a start.
-
We were on that site for a while but the numbers are all rigged on it, or at least can be rigged easily by a malicious script. We actually got to the top, only for a lot of negative votes to mysteriously appear in a short space of time. EDIT: He beat me to it.
-
There indeed seemed to be an option called RSS Export Includes First Post of Topic so I've switched it on and it should now include the first post
-
Just for a bit of fun: Before ProcessWire After ProcessWire I was going to be mean and pick on other CMS', but this is fun just on it's own. Post your examples!
-
Adam quite likes LESS or SASS - I forget which. He only likes them a little bit though, not a lot
-
There are some good stats in there - I think I can pull new registrations over time in daily/weekly/monthly format, but more useful would be new topics and new posts over time since a lot of registrations might be spam accounts that get automatically blocked. There should certainly be some awesome statistics on Google Analytics for the forums to se how much traffic we're getting - I bet both that graph ad the forum posts/topics graph will be on a nice upward curve
-
Out of interest, who's using Less/Sass vs plain old CSS
Pete replied to onjegolders's topic in Dev Talk
slkworm - that sounds good. Presumably that CSS file would then work fine with my Minify module -
I've done this a couple of times recently and changed my dev copy to say "Development" in big letters at the top
-
Well you're welcome any time
-
Out of interest, who's using Less/Sass vs plain old CSS
Pete replied to onjegolders's topic in Dev Talk
I'm really keen to take a look at LESS at some point since it seems like the easiest to set up (only requires a single .js file nowadays to be called before your CSS files so nothing to do on the server side). I would say that the only time I think I could use it is on a new project or a re-design since some of my projects have huge stylesheets and it would be a pain to change them - plus they work the way they are now My only issue is that using LESS CSS with minify won't work, but I just found this which looks like it could be the best of both worlds: http://wearekiss.com/simpless - basically write in LESS and it compiles back to CSS -
PW will only need write access to the /site/assets directory so that should be fine.
-
Is there some caching taking place somewhere perhaps? Can you go to your site's cache folder (site/assets/cache off the top of my head) and delete the contents and see what happens then.
-
You'll find debugging tools are generally used far less with web development unless you've used them elsewhere or are really into debugging. Most web developers I know either use a text editor or Dreamweaver - those using IDEs are the exception rather than the rule I would say, and it tends to be people who are used to that way of working with other languages. With PW I don't find there is any "hoping for the best" - it's pretty straightforward if you're used to PHP and have read some of the docs and tutorials. You'll always have a reasonable idea where something has gone wrong in the code and then be able to double-check it against the cheatsheet, so the time saved with an IDE for me doesn't seem that great. I guess outside of the tutorials and the cheatsheet I don't think many people around here have really had the need to run a debugger
-
Is it not something simple like the fact that you're a logged in superuser? Not sure it'll make a difference but try logging out and checking your output.
-
After login would make sense to me, and check they're a superuser too if it doesn't already would be my suggestion.
-
I just drooled on my keyboard. I'll be installing this one on my sites definitely!