Jump to content

BenSlayers

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by BenSlayers

  1. Hi @kongondo, did you have a chance to review my blog-posts template above?
  2. Thanks @Robin S, that did the trick!
  3. Hello, I've used this module on a few sites in the past but recently tried using it inside a repeater (to reduce the number of unnecessary pages) and I'm having an issue. If I add a new repeater item, I can't select the rating until I save the page. I can see the stars when I hover but if I select a rating, it just goes back to the greyed-out stars. Is there a quick fix for this? I wasn't sure if this issue was only happening with my installation but I just tried it on another website and had the exact same problem. All suggestions are welcome - thanks! Edit: I've also noticed that once I have set the value of the star rating inside my repeater item and save the page, if I try to go back in and change the value, it won't let me.
  4. Sure thing, here is my 'blog-posts' template file, it's identical to my 'blog' template file. <?php namespace ProcessWire; include('./_head.php'); // include header markup ?> <!-- Page title --> <section id="page-title"> <div class="container-fluid"> <div class="page-title"> <?php echo "<h1>" . $page->get('headline|title') . "</h1>";?> </div> <div class="breadcrumb"> <?php echo "<ul>"; $parents = $page->parents; foreach($parents as $parent) { $url = $parent->url; echo "<li><a href='$url'>{$parent->title}</a></li>\n"; } // show current / "we are here" page as well, but not as link: (last element) echo "<li>{$page->title}</li>\n"; echo "</ul>"; ?> </div> </div> </section> <!-- end: Page title --> <!-- Content --> <section id="page-content"> <div class="container-fluid"> <!-- post content --> <?php // Change options for pagination $options = array( 'numPageLinks' => 5, 'listMarkup' => "<ul class='pagination justify-content-center'>{out}</ul>", 'itemMarkup' => "<li class='page-item {class}'>{out}</li>", 'linkMarkup' => '<a href="{url}" class="page-link">{out}</a>', 'currentItemClass' => 'active', 'separatorItemLabel' => '...', 'separatorItemClass' => 'page-link', 'currentLinkMarkup' => '<a href="{url}" class="page-link">{out}</a>', 'nextItemLabel' => '<i class="fa fa-angle-right"></i>', 'nextItemClass' => '', 'previousItemLabel' => '<i class="fa fa-angle-left"></i>', 'previousItemClass' => '', 'lastItemClass' => '', ); $blogposts = $pages->find("template=blog-post, sort=-blog_date, limit=9"); setlocale(LC_ALL,"en_US.UTF8"); $pagination = $blogposts->renderPager($options); ?> <?php if(count($blogposts)): ?> <!-- Blog --> <div id="blog" class="grid-layout post-3-columns m-b-30" data-item="post-item"> <?php foreach ($blogposts as $b) { if(count($b->blog_images)) { $firstimage = $b->blog_images->first(); $thumb = $firstimage->width(640); } echo "<div class='post-item'> <div class='post-item-wrap border shadow'>"; if(count($b->blog_images)) { echo "<div class='post-image'><a href='{$b->url}'><img alt='{$b->title}' src='{$thumb->url}'></a></div>";} echo "<div class='post-item-description'> <span class='post-meta-date'><i class='fa fa-calendar-alt'></i>{$b->blog_date}</span> <span class='post-meta-comments'><a href='{$b->blog_author->url}'><i class='fa fa-user-circle'></i>{$b->blog_author->title}</a></span> <h2><a href='{$b->url}'>{$b->title}</a></h2> <p>{$b->summary}</p> <a href='{$b->url}' class='item-link'>Read More <i class='fa fa-arrow-right'></i></a> </div> </div> </div>"; } ?> </div> <!-- end: Blog --> <?php echo $pagination; ?> <?php endif; ?> </div> <!-- end: post content --> </section> <!-- end: Content --> <?php include('./_foot.php'); // include footer markup ?>
  5. My apologies for the confusion, Kongondo. I updated the post format in my original post on this forum. So if my issue is indeed related to the 'posts' URL segment, do you (or anyone else) have any idea how to resolve it? All suggestions are welcome, I've been fiddling with this for almost two weeks, lol. Edit: I can confirm that it is the "posts" part of the URL that is causing the issue, I tried redirecting "blog/test/" and it redirected just fine but "blog/posts/test/" does not.
  6. Sorry, my post on the forum should have said domain.com/blog/posts/some-post/ - I am using blog style #1.
  7. Hi Dragan, I'm not sure if it matters, but I use the beginner profile, I don't see a ready.php file - I only see that file in the Default or Regular profiles.
  8. Sorry Robin, you were right, I was working in /site/templates/init.php so I removed the code from that file and placed it in a new file at /site/init.php but I get the same result (nothing happens). How does /site/init.php get called? I don't have a /site/ready.php file. I disabled ProCache when this all started, it doesn't have any effect when it's on though (it's currently off). Really appreciate your help, I don't understand why the Jumplinks work with any page that doesn't contain "blog/". Edit: I had the file named incorrectly (/site/_init.php) so I removed the underscore in the name and now I can see the dump is working but only for URLs that don't have "blog/" in them and I'm not redirected to the blog landing page, I get a 404. If I try a link with "blog/" in it, I see the blog landing page but the URL is still the old one instead of domain.com/blog/.
  9. Hi Robin, I tried this but I don't see anything being dumped via the Tracy Debug bar. Even when using random letters, I see my 404 page but nothing in the dump. If I load one of the blog posts that should be redirecting, I see the the Blog landing page content but it still shows the old URL (the same thing that happens when I try to use Jumplinks to redirect blog posts). Your code is the only thing I have in my init.php file except for my _func.php include. The only edits to my .htaccess file are those required by ProCache (gzip & manual directives). I do use url segments for the amp versions of my pages but I haven't created an amp version of my blog pages yet so I'm stumped on what can be causing this. I'm using the latest versions of PW and all modules.
  10. Hi Robin, I'm not sure how to do that... Can you elaborate? I enabled Tracy Debugger but don't see any errors when I visit one of the blog post URLs that should be redirected. Thanks for your help!
  11. Hi Robin, thanks for the advice! I tried adding this to init.php (using my real posts URLs of course) but I get the same result as when I try to add them using Jumplinks. If I load one of the URLs in my browser, I see the blog landing page but the URL is still the old one (/blog/post-title/ instead of just /blog/. If I try to redirect a page using this code that isn't a blog post, it doesn't work, I just get a 404.
  12. No worries, thanks for getting back to me! To remove the posts, I went to the Blog --> Posts tab in PW, checked the boxes for the posts I wanted to remove, then went to Actions -> Delete. I'm using Blog Style 1. I'm able to redirect any page in the website using Jumplinks unless it has "blog/" in it.
  13. Hi @kongondo, I'm having an issue with Jumplinks and I haven't had any luck on that support forum so I thought I would try here since I think the issue might be related to the blog plugin. Can you check my posts here and let me know if you've experienced this behavior? https://processwire.com/talk/topic/8697-jumplinks/?do=findComment&comment=192151
  14. I deleted the posts. I do use URL segments for the AMP versions of my pages but I'm not creating any jumplinks for those (yet). The only htaccess directives I added are for alternate domain names to redirect them to our primary domain. Like this: RewriteCond %{HTTP_HOST} ^secondarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.secondarydomain.com$ RewriteRule (.*)$ https://www.primarydomain.com/$1 [R=301,L]
  15. Yeah, it's weird... I've been using this module for a couple years and never had a problem. The redirects do still work on any source url that don't have "blog/" in them. I'm stumped. Here are the modules I've added in case it helps, all are the latest versions. AdminOnSteroids AutoSmush BlogPublishDate FieldtypeStarRating FormBuilder GoogleClientAPI InputfieldFormBuilderFile InputfieldStarRating MarkupBlog MarkupSimpleNavigation MarkupSitemapXML ProCache ProcessBlog ProcessDatabaseBackups ProcessFormBuilder ProcessJumplinks ProcessProCache ProcessTracyAdminer ProcessWireUpgrade ProcessWireUpgradeCheck TracyDebugger WireMailGmail
  16. Thanks for the note but no, these are regular pages, I'm using the Blog (ProcessBlog & MarkupBlog) module.
  17. Hello, I'm having a really strange issue with this plugin. I using the latest version of PW and all modules. I have a blog (using ProcessBlog & MarkupBlog) and removed a bunch of old posts, I wanted to redirect them to the main blog page (domain.com/blog/). For whatever reason, if I try to register a new jumplink and it has "blog/" in the source (domain.com/blog/posts/some-post/), the redirect doesn't work. I thought maybe I had a problem with one of the existing blog post redirects, so I removed all jumplinks with "blog/" in them and it's still happening. I've tried disabling my other modules, installed Tracy Debugger (no issues), uninstalled Jumplinks and re-installed....no luck. I turned on debug mode in Jumplinks and if I open the source (original) URL in a browser, the debug screen isn't shown. If I register a new jumplink and don't have "blog/" in the source, everything works fine. Even stranger, if I try to visit one of the source URLs with "blog/" in it, the content for the intended page is displayed, but the address bar still shows the source (original) url. I've been pulling my hair out all day and have run out of ideas, please help! ?
  18. Hi Louis, just curious to know if you were able to get this working - I have the exact same situation and haven't been able to find anything helpful in the PW forums. If so, any chance you could post your working code for the navigation?
  19. I have this same problem. Has anyone found a solution?
  20. Much appreciated, can't tell you how frustrating that was. Yes, I usually use /cms/ for the admin URL. Now I just have to remember this little trick next time it happens. Thanks again ??
  21. Thanks for that! I have been stuck on this all morning. It never even occurred to me that it could be CloudFlare causing the issue...ugh. You, sir, are a scholar and a gentleman.
  22. I guess that's where the documentation would come in handy, I just don't understand how to use the Blog module... If I make changes to MarkupBlog.module, won't they be overwritten if I update your plugin in the future? The demo templates seem to be using the delayed output method which I don't know how to use. When I install PW, I use the "Beginner" option with Direct Output (head/foot includes).
  23. Hi kongondo, I've been trying to make this plugin work for two straight days and I'm not having much luck. I'm a bit of a noob when it comes to PHP but I'm usually able to stumble my way through. Can you provide an updated Gist? I'm thinking maybe this one is just too old and won't work with the latest version of your plugin. It seems like copying the renderPosts function to my _func.php file (instead of editing MarkupBlog.module) is the best way to do it so that my changes aren't overwritten when the plugin is updated. I've read this forum over and over, I hate to bother you but the documentation doesn't seem to be complete yet. [UPDATE: I finally got the featured images to work - didn't realize I had to add the "featured" tag to the image - otherwise, I get an error]. Any chance you can provide a working Gist for each of the other properties? IE: categories, authors, archives, comments, tags, next/prev post, etc. - I would like to modify them to match my theme in the same way I did with renderPosts.
×
×
  • Create New...