Jump to content

breezer

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

21 Excellent

About breezer

  • Rank
    Jr. Member

Profile Information

  • Gender
    Male
  • Location
    Brunswick, Ga. (US)

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. breezer

    Laragon slow?

    Although I only do website coding as a hobby, I've always used wampserver. By far it's the easiest to set up and use in my opinion 🙂
  2. I use the following method with success, in your module: public function init() { // add a hook after each page is rendered and modify the output $this->addHookAfter('Page::render', $this, 'page_after_render'); } public function page_after_render($event) { /** @var Page $page */ $page = $event->object; if( $page->template =='admin' ){ $head_include ='<link rel="stylesheet" type="text/css" href="PATH/TO/YOUR/CSS" /> '; $replace = array( '</head>' => $head_include .'</head>' ); $event->return = str_replace( array_keys( $replace ), array_values( $replace ), $event->return ); } } Pretty simple and $replace array can be extended as needed.
  3. Hello all, just an quick update on progress and a question or two. Although rewrite is going slow, I'm pretty happy with the results so far. The forum admin is working in front end and back end (both areas use the same file but with different tpls and stylesheet). User account on front end is working, I made it so new features can be easily added when needed. Front end forum is working, still have to finish the create and edit post functionality and straighten up alot of inline styles in the tpls. I decided to use the built in ckeditor for creation/editing and integrated roxy fileman to insert/manage attachments. Still a ways to go but I'm plugging along so hopefully there will be a test version out within the next couple weeks 🙂
  4. Looks pretty good to me on Firefox / Windows 7:
  5. EDIT: This has nothing to do with Tracy, I'm getting the same message with PW debug enabled so the issue is elsewhere. Thanks for your time. Is this a new issue for you in 4.16.8? To be honest I'm not sure, I didn't have it turned on lately and I upgraded this morning and noticed the message. Do you have any serialize() calls in your code anywhere? No I can't think of any but I'm going through all the files to check. Could you check in the Tracy logs directory: No files at all in the Tracy log directory. I also made the getExceptionFile() method only return true ( in module file and also checked filecompiler ) and still the message shows, so please don't waste any time on this as I have to assume it's something in my code somewhere. I'll look in all the files and see if I can figure it out. Again Happy New Year and thanks for a super tool 🙂
  6. Hello all, hope everyone has a happy new year 🎆 I'm using the newest version of Tracy ( 4.16.8 ) and after enabling Tracy this is showing at the bottom of all pages, front and back end: Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file] on line 0 Googling the message tells me this is something to do with unit testing? Is this Tracy or something in my code? PW: 30118 Apache Version: 2.4.23 - Documentation PHP Version: 7.0.10 - Documentation Server Software: Apache/2.4.23 (Win64) PHP/7.0.10 - Port defined for Apache: 80
  7. Yes sir I already tried to use a dedicated pw page but without rewriting the all the code it just wont work. After a little more thought I decided not to modify the htaccess since what I'm wanting to do is just for looks basically. Thanks and I believe this is resolved. 👍
  8. Hello all, hope everyone's holiday season has been delightful 🙂 Is there a way to allow a specific .php file to be accessed from site/modules ( which is protected via htaccess )? I have an ajax file manager which integrates into a ckeditor front end instance which works fine as a .html file, but if accessed through url or in the ckeditor and user has no permission it still shows the user interface ( although all buttons are disabled ). If I rename it to .php I can kill the process and output an informational message. As a .php file the following directive in htaccess forbids it due to it residing in my module folder. # Block access to any PHP files in /site/modules/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module|info\.json)$ [OR] This is the current url: /pwire30118/site/modules/Xforum/assets/fileman/dev.html This preferred: /pwire30118/site/modules/Xforum/assets/fileman/dev.php If anyone can help it is greatly appreciated, my eyes are bleeding from reading htaccess articles...
  9. This is the way I found that works: 1. Create a new folder in your site Modules folder named Injector ( site/modules/Injector ). 2. Copy / paste the following code into a file named Injector.module.php and put it in your module folder. <?php namespace ProcessWire; class Injector extends Process { public static function getModuleinfo() { return [ 'title' => 'Injector', 'summary' => 'Add content before </head> and before </body>', 'href' => '', 'author' => '', 'version' => '1.0.0', 'singular' => true, 'autoload' => true, ]; } public function init() { // add a hook after each page is rendered and modify the output $this->addHookAfter('Page::render', $this, 'after_render'); } public function after_render($event) { /** @var Page $page */ $page = $event->object; // ignore templates $ignore = array( 'admin' ); if( !in_array( $page->template, $ignore ) ){ $replace =array( '<!--[+head.include+]-->' => ( defined( 'HEAD_INCLUDE' ) ? HEAD_INCLUDE : '' ), '<!--[+body.include+]-->' => ( defined( 'BODY_INCLUDE' ) ? BODY_INCLUDE : '' ) ); $event->return = str_replace( array_keys( $replace ), array_values( $replace ),$event->return ); } } } 4. In your admin, refresh Modules and then install Injector. 5. In your template before the </head> tag, add <!--[+head.include+]-->, also optional add the <!--[+body.include+]--> before the </body> tag. 6. In your script(s) define HEAD_INCLUDE and BODY_INCLUDE ( optional ), ex: $head_include ='<link rel="canonical" href="http://example.com/tags/" />'; define( 'HEAD_INCLUDE', $head_include ); Do the same thing for BODY_INCLUDE if needed. Hope this helps.
  10. Sorry I just started with PW and am using the newer 3.0xx series but I doubt upgrading would break anything.
  11. I had a problem similar to this, and it was a css conflict. It turned out I had installed the LoginRegister module and it's stylesheet was injected into the <head> on the admin page. Check your page source maybe it's something like that.
  12. I had some trouble with FileCompiler when I first started, which pretty much match your issues. Perhaps that is something to look into if this isn't yet solved. Go to the main Processwire site and search in the blog posts for more information on FileCompiler. You can also try going to Admin/Modules, then at the very bottom of the modules list there is a button "Clear Compiled Files"
  13. You were exactly right. It turned out to be the LoginRegister css putting the kabosh on me. Again thanks for a great module, works perfectly.
  14. This new plugin module is a great helper for setting up fields widths for layout:
  15. I'll uninstall and see what happens, thanks for looking into it.
×
×
  • Create New...