Jump to content

Christophe

Members
  • Posts

    688
  • Joined

  • Last visited

Everything posted by Christophe

  1. This is going nowhere. Questions, answers... (57 posts in a few days) that are, most of them, already in the Forums. And some of them, wondering why they are even there. Also, there seems to be some trolling style in the air(s). If not, there is this on google: site:processwire.com/talk/ "your search". Try site:processwire.com/talk/ "silverstripe", or with wordpress or whatever. Here is what I was about to write yesterday at some point (with some things I would have perhaps changed and other things I would have perhaps added): "All this is already known/has already been discussed so many times. These questions (and answers) don't go anywhere and don't add anything. I've wondered several times if you weren't a silverstripe or wordpress developer/maintainer, that wanted to spam the forums. And I've rarely had this impression." ... or who wanted to get ProcessWire's success ingredients to... change the potion that works or do whatever with them.
  2. Try this in Google : "Selected homepage template cannot be used because it does not define access" (with or without quotes, and with or without site:processwire.com/talk/ added).
  3. I like(d) the administration (and its colors), but the last time I tested the demo it was taking quite some time to "load" (ajax?) each time I was clicking somewhere. The framework part is not free if I remember well (I could be wrong or perhaps it has changed now). You need to have a certain level of php to be able to develop with it. (There was an official "competition" to create nice free "themes".) ProcessWire has its API. You can easily convert static pages (/"themes") to dynamic ProcessWire pages. You can relatively easily use any (x)html(5)/css/js framework, grid/system, slideshow, etc. ProcessWire helps you work/develop the way you want/prefer... And more...
  4. Are you using "includes"? Have you, for example, put this part in the header?: <html> <head> <title><?php echo $page->title; ?></title> </head> <body> And this part in the footer?: </body> </html> Please give more details about your approach, your structure(, the profile you use as a basis), etc.
  5. Just edit the "Home" page and change the "Title", which is the "navigation name" by default. (You could redirect your homepage to the page you want.) Please give more details.
  6. Hello, I don't know your "level" of mySQL. It seems it has something to do with the collation. You must be using utf8_general_ci. You could need utf8_unicode_ci, utf8_bin, or a language-specific collation, depending on your project. utf8_swedish_ci seems to be used a lot in Germany. Some are case-insensitive and others are case-sensitive (_cs, utf8_bin...). All have their advantages and disadvantages of course. For example, research "mysql german umlaut unicode" in Google (among others, the first links and also the links inside their targeted pages seems interesting). I can't find it again, but I've seen, if not wrong, that we can just "query" with utf8_bin, or another collation, for example. By indexer you mean http://modules.processwire.com/modules/indexer/? [Far from a specialist, just trying to help.]
  7. Google is our "friend"... Directly "Error: Call to undefined method DirectoryIterator::getExtension()" or site:processwire.com/talk/ "Error: Call to undefined method DirectoryIterator::getExtension()" LostKobrakai's answer will normally soon be indexed, like it is the case for the other answer in the ProcessWire Forums already indexed: number 2 on Google for me just with Error: Call to undefined method DirectoryIterator::getExtension() (and without the quotes) .
  8. Just some ideas among others (in no special order)... It could start with the release of ProcessWire 3(.x) master. It could then be the same day each year, or the day of the release of a new master branch (assuming there is one, no more no less). It could be a day where everyone who wants chooses a specific action to promote ProcessWire (the same day or as soon as one has some free time). We have to be careful not to duplicate things. We all have ideas and can have more ot them... A marketing/communication "team" (and/or section) could be created... A nice ProcessWire article could be written for opensource.com, by someone(s) who knows it well enough, after the release of ProcessWire 3. Please see here: https://processwire.com/talk/topic/2311-processwire-on-the-web/?p=101825 The person who manages the open cms column is waiting for an article , as ProcessWire is already listed at http://opensource.com/resources/projects-and-applications. There could be a "hackathon" to create profiles separately, or to create one functionality/module/profile for a specific "industry" website... Or to make the skyscrapers website responsive (with PocketGrid, etc.). Or to check if everything is fine on the ProcessWire website, to see what can be improved, etc. I have started something (small) yesterday. If I have a positive answer from Google, I will post (about) it so that everyone can help improving it.
  9. In case (perhaps it could have helped you): Redirects: http://modules.processwire.com/modules/process-redirects/; Jumplinks: http://modules.processwire.com/modules/process-jumplinks/.
  10. You can first change the default language (or not), in order to have the French language tabs in first position for example. If you do so: Add the French language pack files there; For the new English (or whatever) language don't add anything. It will use the ("internal") English language by default. In Admin > Access > Users > guest, you can choose the French language, for visitors. In Admin >Modules > Languages Support - Page Names, you have it by default but only for the homepage: Default language homepage URL is same as root URL? In Admin > Setup > Languages > en (or whatever Title you've chosen) > Settings, you can choose: Status: Hidden: Excluded from lists and searches You will only see the French tabs in pages, for example. You won't see the Active? option (and URL row) for the English language anymore. In Pages >Home > Settings, you can just not choose the Active? option for the English language. In Pages >Home > Settings, you can completely remove the /fr/ part of the French URL, if you want to. [ http://modules.processwire.com/modules/french-language-pack/ ]
  11. Started transforming the code to be able to add a current class to the parent of the current sub(-)child/link: <div class="clearfix"> <div class='topnav'> <nav class="nav-wrap-navbar nav-collapse"> <a class="nav-toggle-navbar" data-nav-toggle="#nav-menu" href="#">Menu</a> <div class="nav-menu-navbar" id="nav-menu"> <ul class="nav-navbar"> <?php if($homepage->id == $page->rootParent->id) { echo "<li class='current'><a href='{$config->urls->root}'>{$homepage->title}</a></li>"; } else { echo "<li><a href='{$config->urls->root}'>{$homepage->title}</a></li>"; } foreach($homepage->children as $h_child) { $subchildren = $h_child->children; if(count($subchildren)) { if($subchildren->id == $page->id) { $class = 'current '; } else { $class = ''; } echo "<li class='{$class}dropdown-jumbo' data-dropdown><a href='{$subchildren->first()->url}'>{$h_child->title}<span class='dropdown-show'>+</span><span class='dropdown-hide'>-</span></a><div class='dropdown-menu-jumbo' data-dropdown-menu><div class='container'><div class='grid-three-fourths float-center'><ul>"; foreach($h_child->children as $subchildren) { if($subchildren->id == $page->id) { echo "<li class='current'><a href='{$subchildren->url}'>{$subchildren->title}</a></li>"; } else { echo "<li><a href='{$subchildren->url}'>{$subchildren->title}</a></li>"; } } echo "</ul></div></div></div></li>"; } else { if($h_child->id == $page->id) { echo "<li class='current'>"; } else { echo "<li>"; } echo "<a href='{$h_child->url}'>{$h_child->title}</a></li>"; } } ?> </ul> </div> </nav> </div> </div> For the moment no result. The else part works (tested by replacing the empty string with something else). I feel it's normal that it shouldn't work as it is, but I don't know enough to resolve the problem easily (or at all) for the moment. Perhaps it's just an order and/or a "nested" problem. Edit: replacing $page->id with certain other things in the first if($subchildren->id == $page->id) I can have a current class added... but on all parents having children. Perhaps using &&? I've tried again several variations. Is it possible, or not, to have the current class added to the direct parent of a sub-child if the latter is the current one (with a current class itself)? I've looked a bit in the cheatsheet in case but for the moment... I've just tried with if($subchildren->id == $page->id && $subchildren->parent->id == $page->parent->id), but no... Any "idea"/help?
  12. @Tomas: I didn't know what you already knew or had done, so I posted it in case it helped you or anyone else in the future.
  13. Just wanted to precise that logs are now viewable by default (core functionality): Admin > Setup > Logs >
  14. Hi, In wire/config.php, you can see: /*** 1. SYSTEM MODES ****************************************************************************/ /** * Enable debug mode? * * Debug mode causes additional info to appear for use during site development and debugging. * This is almost always recommended for sites in development. However, you should * always have this disabled for live/production sites since it reveals more information * than is advisible for security. * * #notes This enables debug mode for ALL requests. See the debugIf option for an alternative. * * @var bool * */ $config->debug = false; /** * Enable debug mode if condition is met * * Set debug mode to be false above, and then specify any one of the following here: * 1) IP address of user required to enable debug mode; * 2) Your own callable function name (i.e. "debug_mode") in /site/config.php that returns * true or false for debug mode; * 3) PCRE regular expression to match IP address of user (must start and end with a "/" * slash). If IP address matches, then debug mode is enabled. Regular expression * example: /^123\.456\.789\./ would match all IP addresses that started with 123.456.789. * * #notes When used, this overrides $config->debug, changing it at runtime automatically. * @var string * */ $config->debugIf = ''; /** * Tools, and their order, to show in debug mode (admin) * * Options include: pages, api, session, modules, hooks, database, db, timers, user, input, cache * * @var array * */ $config->debugTools = array( 'pages', 'api', 'session', 'modules', 'hooks', 'database', // PDO 'db', // mysqli 'timers', 'user', 'input', 'cache', ); /** * Enable ProcessWire advanced development mode? * * Turns on additional options in ProcessWire Admin that aren't applicable in all instances. * Be careful with this as some options configured in advanced mode cannot be removed once * set (at least not without going directly into the database). * * #notes Recommended mode is false, except occasionally during ProcessWire core or module development. * @var bool * */ $config->advanced = false; /** * Enable demo mode? * * If true, disables save functions in Process modules (admin). * */ $config->demo = false; Putting $config->debug = true; in site/config.php enables debug mode. You also have Admin > Setup > Logs > Logs are in site/assets/logs/ (and perhaps elsewhere(?)).
  15. <div class="clearfix"> <div class='topnav'> <nav class="nav-wrap-navbar nav-collapse"> <a class="nav-toggle-navbar" data-nav-toggle="#nav-menu" href="#">Menu</a> <div class="nav-menu-navbar" id="nav-menu"> <ul class="nav-navbar"> <?php if($homepage->id == $page->rootParent->id) { echo "<li class='current'><a href='{$config->urls->root}'>{$homepage->title}</a></li>"; } else { echo "<li><a href='{$config->urls->root}'>{$homepage->title}</a></li>"; } foreach($homepage->children as $h_child) { $subchildren = $h_child->children; if(count($subchildren)) { echo "<li class='dropdown-jumbo' data-dropdown><a href='{$subchildren->first()->url}'>{$h_child->title}<span class='dropdown-show'>+</span><span class='dropdown-hide'>-</span></a><div class='dropdown-menu-jumbo' data-dropdown-menu><div class='container'><div class='grid-three-fourths float-center'><ul>"; foreach($h_child->children as $subchildren) { if($subchildren->id == $page->id) { echo "<li class='current'><a href='{$subchildren->url}'>{$subchildren->title}</a></li>"; } else { echo "<li><a href='{$subchildren->url}'>{$subchildren->title}</a></li>"; } } echo "</ul></div></div></div></li>"; } else { if($h_child->id == $page->id) { echo "<li class='current'>"; } else { echo "<li>"; } echo "<a href='{$h_child->url}'>{$h_child->title}</a></li>"; } } ?> </ul> </div> </nav> </div> </div> I will be editing this. I still need help from php experts. Now, only remains to have a current sub(-)child/link (and its direct parent also) in another color thanks to a current class(es). Now, only remains to have the parent of the current sub(-)child/link in another color thanks to a current class. NB: at the end, the code will certainly be duplicating things. It is already...
  16. The main "issue" is fixed. Now I would need to have the code in the header "transformed" in order to have first-level links (whether they have children or not, and including the homepage) in another color when their related page is the current one. And also, for a first-level link that has children, the current sub-link/child would also be in another color. Thank you for some help!
  17. Christophe

    ProcessWire Day

    What about a ProcessWire Day , when we could all celebrate ProcessWire? I know we do it a lot of days already...
  18. I've decided to restart almost from scratch, and without a function for this time. So, for the moment, there is: this in the head: <link rel="stylesheet" href="<?php echo $config->urls->templates?>dist/css/main.min.css" /> <link rel="stylesheet" href="<?php echo $config->urls->templates?>dist/css/drop-jumbo.min.css" /> <link rel="stylesheet" href="<?php echo $config->urls->templates?>dist/css/astro-navbar.min.css" /> <link rel="stylesheet" href="<?php echo $config->urls->templates?>styles/my-custom-css.css" /> </head> this at the end of the body: <script src="<?php echo $config->urls->templates?>dist/js/drop.min.js"></script> <script src="<?php echo $config->urls->templates?>dist/js/astro.min.js"></script> <script src="<?php echo $config->urls->templates?>dist/js/classList.min.js"></script> <script> drop.init(); astro.init(); </script> <!-- feature detection <script src="dist/js/detects.min.js"></script> --> </body> and this in the header: <div class="clearfix"> <div class='topnav'> <nav class="nav-wrap-navbar nav-collapse"> <a class="nav-toggle-navbar" data-nav-toggle="#nav-menu" href="#">Menu</a> <div class="nav-menu-navbar" id="nav-menu"> <ul class="nav-navbar"> <?php if($homepage) { echo "<li class='current'><a href='{$config->urls->root}'>{$homepage->title}</a></li>"; } else { echo "<li><a href='{$config->urls->root}'>{$homepage->title}</a></li>"; } foreach($homepage->children as $page) { $subchildren = $page->children; if(count($subchildren)) { echo "<li class='dropdown-jumbo' data-dropdown><a href='{$subchildren->first()->url}'>{$page->title}<span class='dropdown-show'>+</span><span class='dropdown-hide'>-</span></a><div class='dropdown-menu-jumbo' data-dropdown-menu><div class='container'><div class='grid-three-fourths float-center'><ul>"; foreach($page->children as $subchildren) { echo "<li><a href='{$subchildren->url}'>{$subchildren->title}</a></li>"; } echo "</ul></div></div></div></li>"; } else { if($page->id == $page->rootParent->id) { echo "<li class='current'>"; } else { echo "<li>"; } echo "<a href='{$page->url}'>{$page->title}</a></li>"; } } ?> </ul> </div> </nav> </div> </div> I've tried a lot of variations everywhere. The fact is that I've also tried at the same time to add a class current to the homepage link and the other first level links that don't have children (I'm not sure yet if I should have one also on those with children and what to do with the children as they normally have an active class applied to them with javascript). For the moment I can't manage to have the current class only applied to a first level link that is not the homepage. When one is "current" the homepage is also "current". But my real "issue" currently (what I have to resolve first) is the fact that I've replaced (but not only) something like <div class="grid-half"> Content </div> with <ul><li><a>Text</ul></li></a> in the orginal code, and perhaps because of this when I want to click on a sub-link in the drop-down it doesn't load the page (but the url is fine). So, I'm finally going to have to choose a username (not so easy) and create a GitHub account in order to post to the issues section of the Drop GitHub repository. NB: to choose $homepage->children as $page is perhaps not the best choice in this case (I've tried with something else at some point but it wouldn't work). It could be part of some code I've borrowed, I don't remember exactly. PS: I could provide a link to the online development website to see the link "issue" in action... The problem could come from an active class being applied to a second-level anchor(?).
  19. Hello again, I'd also like to understand what the code is doing .
  20. Perhaps you'll find your solution here: http://stackoverflow.com/questions/18890053/php-conditions-depending-on-window-width-media-queries I guess there are "solutions" with PHP, PHP + Javascript, Javascript... By the way, a ProcessWire version is missing at "3rd party modules" here: https://github.com/serbanghita/mobile-detect NB: don't forget to also read the last answer(s). Edit: see also https://css-tricks.com/forums/topic/how-to-load-a-section-of-content-only-if-the-screen-is-over-a-certain-width/
  21. Christophe

    Own-Mailbox

    https://www.own-mailbox.com/ https://www.kickstarter.com/projects/1547898916/own-mailbox-the-first-100-confidential-mailbox
  22. Hello, For the moment, I only have something like the following in place: Homepage Location 1 Location 2 Location 3 Other link(s) Homepage: one single link. Location 1: several pages on different levels, but normally only one sub-level in this menu (with a contact link, among other links). For the other levels there will certainly be another menu on the side. Location 2: one sub-level only also. There will probably be no more than 3 or 4 pages for this location (including a contact page). Location 3: the same as above but normally with only 2 pages (including a contact page). Other link(s): if there are no children/is no sub-link, <span class="dropdown-show">+</span> <span class="dropdown-hide">-</span> and <div class="dropdown-menu-jumbo" data-dropdown-menu> <div class="container"> <div class="grid-three-fourths float-center"> <ul> <li><a href="#">Sub-link</a></li> </ul> </div> </div> </div> should not be rendered. Not sure how much of the (only) html code can not be included in the function. NB: it could take a lot of time before I can receive/get some (good) content for/from each location: images, texts...
  23. Hello again, I'm just a beginner with regex. I had found the code via Google. The "$1" part seemed a bit strange to me (in this case). It normally corresponds to the first "capturing group" (that you sometimes/always? put between parenthesis). Perhaps a slash was needed before en or se(?). "- Will also redirect any URL that starts with letters "en" on "se" in the default language, for example "/enigma" or "/second"." This seems normal as .* = .{0,} = match any char zero or more times, and there is no slash after en or se. You normally need a slash before (.*), in your case. You could use (en|se) also apparently or [a-z]{2} (Limits to 2 characters. With or without parenthesis, it depends on the case). You can test regex codes at https://regex101.com/, http://regexr.com/ or elsewhere. There is also, for instance, http://regex.learncodethehardway.org/book/. I don't remember if I finished reading everything. I'll probably have to start all over again (one day).
×
×
  • Create New...