
desbest
Members-
Content Count
109 -
Joined
-
Last visited
Community Reputation
20 ExcellentAbout desbest
-
Rank
Sr. Member
Contact Methods
-
Website URL
http://desbest.com
Profile Information
-
Location
Birmingham, UK
Recent Profile Visitors
2,179 profile views
-
desbest started following Padloper 2: Early Alpha Preview + Roadmap
-
Which PayPal API will be supported? Will it support PayPal IPN? I like PayPal IPN. Which Stripe API will be supported? Will it support Stripe Checkout or Stripe Payments? Will it support stripe.js v2 or v3 with elements? Will it use the embeddable stripe form that looks like this?
-
desbest started following Hook before a 404 exception, Future of Padloper - New Project Lead Announcement, My error 404 pages do not show and and 1 other
-
It's been 2 years @kongondo Is there any updates on this???
-
What does this mean? What's the reason for the change?
-
"daurl" is a field I've defined in processwire myself
-
Hello I've updated the code to if ($page->id != $config->http404PageID) { $session->redirect($page->daurl); } //redirect to link and it still doesn't work
-
I've made my own redirect template for redirecting url's like http://hostingz.org/indicho I think this redirect template is conflicting with the error 404 page. <?php function bot_detected() { return ( isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT']) ); } if (bot_detected() === true){ //echo "is a bot"; } else { //echo "not a bot"; $hitcount = $page->views; $newhitcount = $page->views +1; //add 1 to the view counter $daview = $pages->get($page->id); $daview->of(false); $daview->views = $newhitcount; $daview->save(); //save the higher value onto the link page } $session->redirect($page->daurl); //redirect to link ?> and there's _init.php <?php $pages->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'post') {// template used by 'post-a' // ensure that pages with template 'post' live off the root rather than '/posts/' $event->replace = true; $event->return = "/$page->name/"; } }); ?>
-
No that's not the page that should be displaying. This page should be displaying instead.
-
My error pages do not show on my website. [see here] My web browser Firefox shows this error I have no PHP on the error404.php template. What is going on, and how do I fix it?
-
Error when saving a page that has an image in it
desbest replied to desbest's topic in Getting Started
I've checked my logs and this is the error I get All I did is copy a post from my wordpress rich text editor and paste it into the processwire rich text editor then click save. -
Error when saving a page that has an image in it
desbest replied to desbest's topic in Getting Started
I have searched Google and the forum and couldn't find the solution to my problem. I have used the correct chmod for folders and files, I have the appropriate folders in site/assets/, and I'm not ready to disable CSRF in config.php for security reasons. -
Error when saving a page that has an image in it
desbest replied to desbest's topic in Getting Started
I've checked the thread and my hosting account has free disk space and the images are successfully being uploaded with the bytes intact, so it's not that. -
I'm having an error when I save a page that has an image in it. Below is the error I get I'm using ProcessWire 3.0.98 How do I fix this?
-
Hello I'm having trouble figuring out how to use the code above to run a hook before an error 404 exception, for when a template file is run with due to $config->prependTemplateFile before any template file runs. <?php //wire()->addHookBefore('Page::path', function($event) { @note: this or below, both work. $pages->addHookBefore('ProcessPageView::pageNotFound', function($event) { echo "<h1>hello</h1>"; $page = $event->object; if($page->template == 'LinkShortener') {// template used by 'post-a' $dapath = str_replace("/", "", $_SERVER[REQUEST_URI]); $redirectTo = $pages->find("template=LinkShortener,name=$dapath")->first(); header("Location: $redirectTo->full_path"); } }); The text hello does not display for an error 404. What is going on?
-
Hello after the late reply, I can't use that example of redirecting a URL with query strings to a static page, because the pages I would like to use URL rewriting for are not static pages, they are dynamically generated based on what is inside the query string. See below for examples. Cryptocurrency comparison: BVC vs Changelly // Binance vs Changelly Forex comparison: IC Markets vs AvaTrade // EasyMarkets vs AvaTrade Note the query string in the URL. I would like to rewrite the URL based on the query string, of which the content of the page is dynamically generated based on the query string.
-
I've read all three threads and have these comments. The pages on my website I want to write have a query string on the end, so I would like to rewrite the URL so instead of the URL saying /broker/?choice1=1206&choice2=1207&mode=cryptocurrency it instead says /compare/local-bitcoins-vs-cex-io ,so that means that the threads Virtual Parents and Hide Parent Page From URL are not suitable for my needs. That leaves me with Routing and Rewriting URLs left to read. The only relevant post in the thread is this one, and I have followed those instructions (see first post above) and the route isn't created and the URL does not rewrite. What is going on?