Jump to content

Macrura

PW-Moderators
  • Posts

    2,780
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Macrura

  1. sometimes clients need landing pages for marketing/seo that need to live off the root. all of these pages would make a mess in the page tree, so they are stored under /landing-pages/ I always do a hook (as was demonstrated in the CMS Critic Case Study) wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'landing-page') { // ensure that pages with template 'landing-page' live off the root $event->replace = true; $event->return = "/$page->name/"; } }); on the landing page template: // if someone tries to access this page at it's real location in the page tree, redirect to the fake URL: if(!$input->urlSegment1) { $session->redirect($page->url); } i should also add that on the homepage there is this: /** * First, check to see if there is a URL segment off the homepage * this is used to generate custom landing pages, for marketing etc.. * with a shorter URL, living off the root. * */ if(strlen($input->urlSegment2)) { // we only accept 1 URL segment here, so 404 if there are any more throw new Wire404Exception(); } else if(strlen($input->urlSegment1)) { // render the landing page named in urlSegment1 $name = $sanitizer->pageName($input->urlSegment1); $landingPage = $pages->get(2281)->child("name=$name, include=hidden"); if($landingPage->id) echo $landingPage->render(); else throw new Wire404Exception(); } else { // do the normal homepage... so that's why the segment check on the landing page template, because when it is being rendered from the homepage, if(!$input->urlSegment1) will be true
  2. I use AIOM+ and then regular php to manage the array before the AIOM+ is called.. im usually setting the scripts array in the init, like $minifyCSS = true; $minifyJS = true; $stylesheets = array( 'assets/bootstrap/css/bootstrap.min.css', 'assets/css/font-awesome.min.css', 'assets/css/style.css', 'assets/css/custom.css', ); $jsfiles = array( 'assets/js/jquery-2.1.3.min.js', 'assets/js/imagesloaded.pkgd.js', 'assets/js/custom.js', ); in templates i sometimes do this (if styles/scripts need to be before last one, e.g. if last style is custom/override) $jsOffset = -1; $cssOffset = -1; //1.) Event Calendar array_splice($jsfiles, $jsOffset, 0, 'plugins/eventCalendar/js/jquery.event.calendar.js'); array_splice($jsfiles, $jsOffset, 0, 'plugins/eventCalendar/js/languages/jquery.event.calendar.en.js'); array_splice($stylesheets, $cssOffset, 0, 'plugins/eventCalendar/css/jquery.event.calendar.css'); or simple: $jsfiles[] = 'plugins/soundManager/js/soundmanager2-nodebug-jsmin.js'; $jsfiles[] = 'plugins/soundManager/page-player/script/page-player.js'; $stylesheets[] = 'plugins/soundManager/page-player/css/page-player.css'; then outputting: if($minifyCSS == true) { echo "\t" . '<link rel="stylesheet" type="text/css" href="' . AllInOneMinify::CSS($stylesheets) . '" />' . "\n"; } else { foreach($stylesheets as $stylesheet) { echo "\t<link href='{$templates}{$stylesheet}' rel='stylesheet'>\n"; } } // END IF MINIFY this lets you toggle AIOM and good for development and troubleshooting stuff.. i should also clarify that for brevity, i setup a lot of aliases in the init, like: $templates = $config->urls->templates;
  3. i would say maybe try disabling the upgrades and/or upgrade check module, then also check with the host and see if they have any security rules that your ip is triggering?
  4. that's a good question, i'm not sure, but maybe as a quick fix you could use some jQuery (e.g. using admin custom files) to parse that into formatted html
  5. i would definitely check with the hoster and see if they are blocking bing; i would also follow @cstevensjr advice and try the sitemap;also try and see if you can specifically set the search domain as www version
  6. @noodles - stay tuned - there is a module coming out that handles all page selects, making them configurably link to a modal for the page.There is also some code already here and there and a proof-of-concept module floating around that does this; and Soma also had a module that enabled this function a ways back; will try and find relevant posts later and add here..
  7. just some guesses - 1.) do you have a robots.txt file in the root 2.) have you checked to see if Bing is accessing the same site, www vs non-www?
  8. ok thanks for all your help and info- i will try it again, i didn't know anything about honeypot and that the website field was the honeypot must have somehow missed that in the docs. so can i just change the message input to a textarea, and it should work i guess. i will test and post back results.
  9. probably the best way for what you are asking would be what Ryan did in the CMS Critic Case Study, where you rewrite those URLS for those pages, using a simple hook into the page URL.
  10. @Mike - this is really great, especially the new features; and a lot of care went into the documentation, and is much appreciated.. i hope others will find this useful! will be upgrading that site i was testing on and report back any issues.
  11. @justb3a had some issues; spent about 2 hrs trying to get this to work; some of the documentation does need improvement, for example it should say to echo the module, or the module should echo. for one, there should be a way to disable the whole spam thing, besides putting in the ip address. makes it hard to test; sometimes i'm trying to test this and it's redirecting to the homepage, sometimes the form just shows again with the fields filled in, i have no idea what is wrong; and then i'm trying to do a simple form and change the markup but it either seems to break, or it triggers the spam thing. the message area should be a textarea; seems that changing from input to textarea also was messing things up; i appreciate all of the hard work that went into this, just seems that it could use some additional improvements and some better documentation.. for now i'll have to stick with formbuilder for this site, but have somee friends who need to use this; so we'll have to sort out this textarea thing, and also how to completely disable the spam thing. plus i can fill out a form in way less than 1 minute, so how can that be a real spam prevention technique; doesn't make so much sense; maybe consider some simpler spam prevention like honeypot... thanks for listening.
  12. what are your settings for the submit - does it stay on the same page, or do you redirect to another page? where does your form submit to (action) - self or some other page? main thing when using hanna code for a form is that if you are posting to the self page, the textformatter might somehow cause the form to submit 2x, upon submit
  13. i think the selector redirect is working, wow that's so cool; and i'm seeing the debug log now.
  14. also, i'm still needing to rename the tables in the module to ProcessRedirects, since i'm on unix.. But now it worked, so all of my original redirects are now imported- thanks! will carry on testing the selector redirect now..
  15. hi mike - where should i look for the log, checked the module, and site/assets, but not seeing any logs; also getting this... Mysqli was instantiated and queries were made. These should ideally be converted to PDO ($database). Here are the queries: 0 SELECT * FROM process_jumplinks ORDER BY source [4 rows] [0.0321s, 0.0321s, 0.0365979671478s] 1 SELECT * FROM process_jumplinks_mc ORDER BY collection_name [0 rows] [0.0181s, 0.0502s, 0.136598110199s]
  16. it will only import 1 link at a time from the redirects module; i was able to get 2 of them imported by importing then going to the database, changing the setting to false, importing the next one, etc.. but there must be some problem; also, i can't get the selector to work; i have this entered in the source: store_item_detail.cfm?item_ID={id} and this entered in the destination: [[template=product-legacy,legacy_item_id={id}]] but no luck in terms of it forwarding to the page, just getting 404 and no log with debug on, and the forward doesn't work with debug off;
  17. ok thanks - sorry didn't see those instructions; will be back on this tonight and will report back...
  18. wow amazing.. will test asap. how can i reset things and try the import again - still the issue that my PR import failed...
  19. right - yes it must be a case sensing issue with MySQL. this one i'm running is 5.5.40-36.1-log processRedirects does fail if i rename the table to all lowercase
  20. yeah - sorry - to clarify and answer the above post, i failed to click the last import button, so no problem there; on my 2nd try i renamed the database in the Jumplinks Module wherever it said processredirects i renamed to ProcessRedirects; then i ran the import but it only imported the first one; i can't see how JL queries would have worked because looking at the Redirect module, (unless for some reason i have a legacy version that isn't showing it needs to be updated), it uses $this->className for the queries
  21. ok - i renamed it then ran the import; that seemed to have worked, but then when i renamed it back to ProcessRedirects, Jumplinks doesn't show those anymore ok i didn't actually click the final import button; so i went into the jumplinks module, renamed the tables to ProcessRedirects, and then ran the import but it only took the first redirect; now it won't let me do it over
  22. for some reason the table in my install is upper camel case, so the table is called ProcessRedirects.. i wonder if i should try changing it on another note - is there any functionality to find a page based on a field - for example, i have the legacy IDs stored with the pages themselves, and i was using get vars on a template to redirect to the page; wondering if JL can handle this. so instead of a mapping collection you would have a selector? template=product-legacy, legacy_item_id={id} one last thing - the start and end both say 2015 years ago
  23. i have a site which was using redirects and am migrating those into Jumplinks. when i try to import, i get errors and can't import.. Table 'walsh_prowire26.processredirects' doesn't exist SELECT * FROM processredirects ORDER BY redirect_from#0 [internal function]: Database->query('SELECT * FROM p...') this is an older site but it does show i'm running the latest process redirects module
  24. session redirect also sends 301. my way should work fine
×
×
  • Create New...