desbest

Members
  • Content Count

    101
  • Joined

  • Last visited

Community Reputation

18 Good

About desbest

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    http://desbest.com

Profile Information

  • Location
    Birmingham, UK

Recent Profile Visitors

1,548 profile views
  1. 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.
  2. 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.
  3. 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.
  4. 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?
  5. desbest

    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?
  6. desbest

    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.
  7. desbest

    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?
  8. desbest

    Hello I checked, and I'm not calling my hook too late, because I put exit(); on runfirst.php, nothing displayed when running my website in the web browser. runfirst.php is running before every other template file runs. I tried the code in hooks.php and it doesn't work. I made a quick modification to what hooks.php to the page below, and it doesn't work. wire()->addHookBefore('Page::path', function($event) { $page = $event->object; $event->replace = true; $event->return = "/x/$page->name/"; }); mod_rewrite is enabled and the URL of every page in my Processwire website isn't being rewritten. I'm using Processwire 3.0.99 What is going on that isn't allowing me to rewrite the URL in Processwire?
  9. I can't get rewriting the URL to work on processwire. Below is my following code in runfirst.php template file that runs before any other template as defined in the config file with $config->prependTemplateFile = 'runfirst.php'; <?php //url rewrite // https://processwire.com/talk/topic/1799-routes-and-rewriting-urls/ function segmentUrl(HookEvent $event){ $url = $event->return; // requested url $segment = "/page/"; if(strpos($url,$segment) == 0){ $event->return = str_replace(rtrim($segment,'/'),'/article/',$url); } } // https://processwire.com/talk/topic/2984-controlling-page-url-structure/ function hookPagePath(HookEvent $e) { $page = $e->object; // if($page->template == 'article') $e->return = "/article/$page->name/"; $e->return = "/article/$page->name/"; } // $wire->addHookAfter('Page::path', null, 'segmentUrl'); // $pages->addHookAfter('Page::path', null, 'hookPagePath'); ?> It doesn't matter which ->addHookAfter command I use, the page still does not rewrite. I have enabled URL segments on the template for the web page I am running. What is going on and how do I fix it?
  10. desbest

    It is possible to have a responsive design for mybb. Here is a good example on the Sinisterly forum. I choose mybb over php because back in 2006-2008 I ran a free web hosting company, and made the big mistake of choosing phpbb instead of mybb. There was no such thing as plugins. They were called mods. To install a mod you had to modify the core phpbb code, and this caused HUGE problems if you had multiple mods installed or were running a newer phpbb version. Some mods would not work even if you had the required phpbb version and had followed the installation instructions correctly! You had to backup your website every time before you installed a mod. The "automod" mod which automated the modification of phpbb core files made the process easier, but did not solve any problems. You also have to backup your forum before upgrading phpbb as they do new versions which break the website and theme of the website if you're using a custom theme. Phpbb uses bad shoddy code and mybb uses better code. The way to make plugins for mybb is much better than how to make a plugin for phpbb. And mybb has the XThreads plugin! PS. I have not tried phpbb 3.1 and above where they rewrote a lot of things, added new features and removed lots of the suckiness.
  11. desbest

    I recommend MyBB with XThreads and you might want to make a mybb plugin yourself.
  12. desbest

    Well spotted! I am fully aware of this. As my client has not added enough blog posts to the website and the website doesn't get enough traffic as it's not being advertised yet, we both agreed not to format or give stylesheets to those pages. When there are more articles on the blog, it will make sense to style those pages later, as people will want to browse by author, category, tag and date. Also I think I'll leave the blog/post/ page without a stylesheet as a joke. It's not a page that people are expected to find. Maybe I should add an easter egg there.
  13. desbest

    I got my client to send me a Word file in Outline View of the questions and to indent right for every subsequent question, and put the 3 desired outcomes for each question in brackets. However for two of the questions which appear in succession, how you answer both of the questions, dictates the final 3 results rather than the 3 results being chosen for one option. What the javascript code does, is have a "mayberesults1" array and "mayberesults2" array for both questions, and it checks whether what 3 results are in "mayberesults2", whether they match what's in "mayberesults1". If they match, it is kept, if there is no match, one of the outcomes from "mayberesults1" is dropped and replaced with one from "mayberesults2". If you use Ctrl+U or Cloverleaf+U then you can see the javascript code for yourself at the bottom of the page. The "results" and "mayberesults1/2" are a HTML tag attribute added to the element you click on. What is inside the attribute are three page id's separated by a pipe symbol, (eg. 473|382|943) There is also a sitemap which makes use of the Sitemap module. Other modules used are Form Builder, Blog, Wire Mail SMTP, Padloper will be used in future once my client gets tutors involved on the website. Below are some screenshots of the website that you won't see on the current website. I prefer the old home page that had the photo on it as it is more graphical and I'm not a fan of minimalism, but the client went with his newest idea for a home page.
  14. desbest

    I've made a website for a client, called Ekzaga which serves multiple purposes. It is a forex broker and cryptocurrency exchange directory, as well as a trading tutor marketplace. The trading tutor marketplace section is hidden as my client is trying to get various tutors to join the website willing to teach students, but it does exist in the code, you just can't access it online. Launch Ekzaga
  15. My bookmark isn't being saved properly, as it saves a different selector than what I chose A gif video showing this bug is below. I am using Processwire 3.0.62 I believe that there is a bug with saving bookmarks where the selector being saved is 2 "is empty" for a 2 repeater fields which have OR on them. Update This has been fixed in the latest version of Processwire, specifically the 3.0.94 version