Jump to content

Ben Sayers

  • Content Count

  • Joined

  • Last visited

Community Reputation

7 Neutral

About Ben Sayers

  • Rank
    Jr. Member

Profile Information

  • Location
    Howell, Michigan, USA

Recent Profile Visitors

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

  1. Hi all, I'm having an issue on my search page when using SeoMaestro, any idea how to resolve? Error: Exception: Operator '~=' is not implemented in FieldtypeSeoMaestro (in /home/kbellaspa/public_html/wire/core/Fieldtype.php line 693)
  2. Very nice, that worked flawlessly. Thank you so much for your help @horst, what a time-saver! Cheers 🍻
  3. Yeah dude - that was it!! THANKS! So now, I can just comment out the die('BREAK!!'); and reload the script? Then if everything looks good, remove the script from the server?
  4. Does it matter that my site only has one language (english)? I see that the foreach from Wanze is for a multi-language site.
  5. Wow, I can't believe I missed that, sorry. OK, so I replaced your name with mine (admin) and uncommented die('BREAK!!'); - now I see the following message but when I open the homepage in PW, the text from seo_title and seo_description hasn't been added to title and description in the seo field. www.domain.com :: seomigrate.php - [1 / 343] Home BREAK!!
  6. Hi @horst, thanks for the tips! I definitely don't need to use the migrator module, I didn't even know you could run a script like this, lol. So I backed up my DB and copied your script to a new file (seomigrate.php), uploaded that next to index.php in root and then opened that file in a browser but all I see is "RIP". I checked my pages and none of the data has been copied to the seo field. I thought maybe it was my selector so I found this ProcessSelectorTest module to verify the selector is working correctly, there were 343 pages found. Any idea what I'm doing wrong? I'm not much of a programmer, mostly a front-end guy so please forgive my ignorance πŸ€¦β€β™‚οΈ <?php namespace ProcessWire; // prepare server for continuous output if(function_exists('apache_setenv')) @apache_setenv('no-gzip', '1'); @ini_set('zlib.output_compression', 'Off'); @ini_set('output_buffering ', '0'); @ini_set('implicit_flush', '1'); @ob_implicit_flush(true); @ob_end_flush(); //if(isset($_SERVER['HTTP_HOST'])) header('Content-Type: text/plain'); // bootstrap PW require_once('./index.php'); // here you bootstrap PW, after that line you will have available the most PW variables and functions. if(!$user->isSuperuser()) { // when using those scripts online, I do secure them with forcing a login in the admin as Superuser, ... echo "ACCESS DENIED! ($user->name)"; exit(1); } elseif($user->isSuperuser() && 'horst' == $user->name) { // and where are multiple superusers registered, additionally limited to my username echo '<pre>'.$_SERVER['HTTP_HOST'].' :: '.basename(__FILE__)."\n"; $selector = " seo_title|seo_description!='',include=all "; $pa = $pages->find($selector); // or: $pa = $pages->findMany($selector); $max = count($pa); $cur = 0; foreach($pa as $p) { // loop over all collected pages set_time_limit(30); // renew the time limit for each loop, so that you may run this script long times, but lets it time out on failures in a reasonable short timeframe $cur++; // following do your work if(!$p->hasField('seo')) { continue; } echo " - [$cur / $max] {$p->title}\n"; $p->of(false); foreach (wire('languages') as $lang) { wire('user')->language = $lang; $title = $p->seo_title->getLanguageValue($lang); $desc = $p->seo_description->getLanguageValue($lang); $p->seo->meta->title = $title ?: 'inherit'; $p->seo->meta->description = $desc ?: 'inherit'; } $p->save(); $pages->uncacheAll($p); // after saving, uncahe the current page //die('BREAK!!'); // just when first test the script before processing all items } die('<p>READY!</p>'); } die('RIP'); ?>
  7. Hi, I'd like to add this module to an existing site that is 400+ pages, I see you have this handy-dandy script and it should work perfectly for my needs because my setup is identical to yours - basically, I have a text field (seo_title) and a textarea field (seo_description) that I would like to copy over to my new seomaestro field (seo). I've installed the Migrations module but I have no idea how to run this script with it. I tried looking through the Migrations forum but it's all Greek to me. I'm hoping one of you talented folks can shed some light so I don't have to copy and paste 800 lines of text, lol. Thanks! πŸ™
  8. Thanks! I can see the images now but I don't see any documentation on how to adjust the thumbnail dimensions. Ideally, I would be able to set the width and height of the thumbnails and then open the {src} in a lightbox/modal, is that possible? Something like this?: <?php $instagram = $modules->get("InstagramBasicDisplayApi"); $images = $instagram->getImages(9); echo "<div data-lightbox='gallery'>" . $images->each("<a href='{src}' data-lightbox='gallery-image'>" . "<img src='{thumb}' alt='{alt}'>" . "</a>") . "</div>"; ?>
  9. Hi, I decided to test this out but it's not working for me. I was able to complete the configuration using your instructions so my IG user account shows up under Authorized Accounts but when I try to load the page, I get this error: Fatal Error: Uncaught Error: Call to a member function getImages() on null in /home/clientname/public_html/site/templates/_sidebar.php:59 Here's my code: <?php // Get 9 images from the default user $images = $instagram->getImages(9); // Render the images echo "<div data-lightbox='gallery'>" . $images->each("<a href='{href}' data-lightbox='gallery-image'>" . "<img src='{src}' alt='{alt}'>" . "</a>") . "</div>"; ?>
  10. Nice, thank you for the heads up @adrian! I'm following that thread now.
  11. Yeah, I'm getting that impression after tinkering with it for the weekend. Should I even bother with it, do you think it's a viable solution or more trouble than it's worth? I did receive the PM, thanks!
  12. Hi @adrian, I'm having this same issue with the display but I'm using the most recent version of Recurme and PW. Do you remember how this was resolved or can you point me in the right direction? I know this plugin isn't supported anymore but it looks like it does exactly what I need so I'm hoping I can make it work. Does anyone have plans to take over management of this module? Any help is most appreciated, thank you!! πŸ™
  13. Not a problem at all @kongondo, I know how it goes πŸ˜ƒ I used the first option with Jumplinks and it WORKS!! Hallelujah, thank you so much for your time.
  14. Hi @kongondo, no problem at all! I'm just happy to have your support πŸ˜ƒ - I'll stay tuned, thanks!!
  15. Hi @kongondo, did you have a chance to review my blog-posts template above?
  • Create New...