Jump to content

Gazley

Members
  • Posts

    529
  • Joined

  • Last visited

Everything posted by Gazley

  1. Hi diogo Thanks for replying The $config->dbName directive is in the file. However, this will be from my localhost that I pushed to GitHub and then cloned into my Root folder on the live server. So, the DB isn't installed in MySQL even though it is specified in the config file. Any suggestions? Thanks --Gary
  2. Thanks diogo!
  3. Hi there, I'm just in the middle of installing a PW site on a live server. I pointed the browser at the domain before I had called the install.php script. An error message occurred that I failed to record However, I pointed the browser at the site specifying the install.php script but I get the following message in the browser: "This installer has already run. Please delete it." It most definitely hasn't presented the installation options or anything like that. My question is whether and how I can re-run the install.php script? I have since renamed htaccess.txt to .htaccess If anyone can point me in the right direction, I'd be very grateful indeed! Cheers --Gary
  4. That's pretty much the conclusion I ended up at but it still seems odd that you can't. Shame. Thanks everyone for participating in this discussion.
  5. Hi teppo, You'll have to believe me on this $outVal contains the embedded <?=$pages->get('/smart-devices/')->url?> between the quotations in the link's href. I'm not actually echoing out the whole string. The string is ultimately being built up and specified against a $page variable called $page->outVal - in my layout file that is part of the final include'd master "main.php" file, $page->outVal is referenced there. I guess I assumed that it would "eval" any PHP content but it doesn't seem to do that. This means that I would actually have to specify the actual URL in the href.
  6. $partial->set('text_area', $outBody) is a line in a method, not a template file, so I echoed out the value: string '<h1>GXflow™ Lets you Model, Automate, Manage & Optimize Business Processes in <em>any</em> Company!</h1> <p class="lead">GXflow is a tool that allows modeling, automating, managing and optimizing the business processes in a company for the creation of mission-critical applications in a simple and effective way.</p> <div class="gxp-kf well wb mb-40"> <h2>Key Features For GXflow™</h2> <div class="features"> <div> <div class="one_col"> '... (length=3954)
  7. Hi teppo - the markup that I've suggested is part of the variable is actually content from a number of fields on a page that are merged together into a partial file. The markup string is built up and then set() into a property in a TemplateFile based on the partial. I then call render() on the TemplateFile instance. Does that make sense?
  8. Hi diogo - I'm using PHP 5.4 so I think they're the default. Anyway, I had tried regular tags with the same result.
  9. Hi there, I think I'm going a bit crazy! I have a string value like the following: <p><a href="<?=$pages->get('/smart-devices/')->url?>">Mobile Application Development</a> for Android, BlackBerry and iOS. Auto-generate native code without any user knowledge required</p> This value is part of the value in $outBody (see following) I set as a template value like so: $partial = new TemplateFile(wire('config')->paths->templates . 'partials/text_area.inc'); $partial->set('text_area', $outBody); $pages = wire('pages'); $page->outBody = $partial->render(); The actual last line of the real template file says: include("{$config->paths->templates}main.php"); The main.php file includes a layout file that says: <?= $page->outHeader ?> <section class="<?= $page->sectionClass ?>"> <? $class_name = 'static'; if ($page->static_page !== 1) { echo $page->list_items; $class_name = 'content'; } ?> <div class="<?=$class_name?>"> <?= $page->outBody ? $page->outBody : $page->body ?> </div> </section> <?= $page->footerBand ?> You can see that it directly references the $page->outBody variable. The problem is that in main.php, the href of the link specified at the start resolves to <?=$pages->get('/smart-devices/')->url?> and not the actual URL! What am I doing wrong here? It seems that PHP is just not evaluating the expression despite the PHP on/off directives that wrap it. Any suggestions to stop me going more crazy! Thanks --Gary
  10. Thanks Wanze - that's a nice suggestion.
  11. Hi there, I have a "partial" based system where I have a class name (some_partial.php) and an associated ".html" file (some_partial.inc). If the class exists as a "partial", when rendered, it creates a TemplateFile using the path to its associated .html file. I've now a scenario where there are advantages to have the data that was in the .html file actually stored in a PW "page" (/partials/some_partial). When the partial instantiates, if it can't find a disk based .html file, it checks to see if there is a PW "page based partial". The HTML is in the page's body field. However, TemplateFile wants a file path to construct an instance. Is there a way to get a TemplateFile instance using the html data in my $page->body memory variable? Thanks.
  12. Thanks Soma - some interesting stuff there and definately along the lines I was looking for.
  13. Hi there, I just wondered what other users are doing in the following scenario. I use the summary field to contain hold text that I use as the meta description in search engines. If the field is empty, I would like to select the first 'n' characters of the body field so that at least something is being used for the meta description. There are numerous ways to do this in PHP. I recall that ExpressionEngine had a first party add-on that did something similar to this and also added '...' to the end of the string too, so that you could use existing copy as a summary in other places, like, the home page. Before I re-invent the wheel, I thought I would ask whether there is a standard PW approach or some handy-dandy class you could recommend? Thanks! --Gary
  14. OK, thanks Ryan.
  15. Hey, no worries on this one, I figured it out. It was a namespace issue that was causing the confusion. Cheers ...
  16. Hi there, I've tried to spl_autoload_register a class in my head.inc file. However, PW's "ProcessWireClassLoader" jumps in and looks for my class in the wrong place. I just want my own handler to be invoked, not PW's. Any ideas? Ta. --G
  17. Hi there, I've just started using ACE and when I drop an image onto the editor surface, it registers the image in the images field but there is no image path specified on the editor surface, as shown in the video. I'm using latest PW and ACE. Any tips or advice around how to get the images path specified in ACE would be great! Cheers.
  18. Thanks a lot for the replies! They really helped Cheers.
  19. Hey guys, It's been a while! Any rules of thumb as to exactly what are the minimum directories that need to be made open in robots.txt so that search engines can crawl only what they need to see? By this, I mean all published pages and the images they contain. As PW is based on the front-controller pattern, I assume that pages can be reached via access to index.php in the root folder. I'd be interested in your thoughts/experiences. Cheers!
  20. Thanks Ryan. Been a while since I've visited the site and boy, it's changed a lot with lots of new faces. I think you've created a monster! (a nice monster though)
  21. Hi there, I've just installed apeisa's ProcessRedirects module and I have a few questions around it. I've inserted a bunch of URLs that are similar to the following: http://www.iconicboudoir.co.uk/?contact-iconic-boudoir/, http://www.iconicboudoir.co.uk/contact/ http://www.iconicboudoir.co.uk/#/contact-iconic-boudoir/, http://www.iconicboudoir.co.uk/contact/ in the above case, the "Redirects from" takes the following form: /http://www.iconicboudoir.co.uk/?contact-iconic-boudoir/ /http://www.iconicboudoir.co.uk/#/contact-iconic-boudoir/ IOW, the slash is added in front of the URL. I'm assuming therefore that we don't need the domain to be specified, just the path. However, if I specify the path(s) of: /?contact-iconic-boudoir/ /#/contact-iconic-boudoir/ The module complains: redirect_from: Error found - please check that it is a valid URL The original URLs are from a dynamic Ajax based site. The form /#/ is how the system itself defines its URLs but Google sees them as /? hence why they are specified twice, depending on what has been linked to. Any ideas around this or am I better off using .htaccess or seeing if I can modify the plugin? Many thanks!
  22. Some nice stuff in there Ryan. Particularly excited to be able to tag and query images by tag. On this point, can you specify more than a single tag in a query? I often need to pull back images based on more than one tag. Thanks for all your efforts!
  23. Wow! Some absolutely brilliant recommendations. Thank you all so much! Cheers!
  24. Hi there, Any suggestions for a touch aware photo gallery? I used Fancybox on the site I have just installed remotely. When I tried the site on an iPhone and iPad, Fancybox doesn't appear to respond to touch, in place of a mouse click, when you touch its previous/next buttons or on the left or right half of the image. If anyone has any suggestions for a really good mouse/touch aware gallery utility, I'd appreciate your recommendations. Many thanks.
  25. @adamkiss - thanks for being happy for me! Yeah, it can be a bit hairy when these things happen and it's nice to know that you have the support of a great team of fellow users to help or just empathise with you. It's great to know you're not alone; a position I've been in the past on many occasions. Cheers!
×
×
  • Create New...