Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by zkriszti

  1. For some reason, the Blog Module sample file blog-tag.php gave me an error stating "Error: Call to a member function count() on a non-object (line 830 of C:\wamp\www\...\site\assets\cache\FileCompiler\site\modules\MarkupBlog\MarkupBlog.module) ". With your code above @MadeMyDay, it now works like a charm! (I've put it here for reference for those searching later).
  2. I seem to have another issue, and as far as I've found out (having searched all the way through the forum), this is related to the small version of posts stripping tags. More exactly, I can't get 'post_small_allowable_tags' to work. I just can't seem to get the "view more" anchor appear. The affected page is a blog-category view (based on the module's blog-category.php), where I get a few post excerpts from a given category, ideally with adding that "view more" tag. Which is nowhere to be found in the output. The relevant parts of my template file look like this: $options = array('post_small_allowable_tags' => '<p><a>', 'post_more_text' => 'tovább'); $content .= $blog->renderPosts($posts, true, $options); Then the html output looks like this: <div class="summary"> <p>It's my blogpost and here is a <a href="http://...">link to my another article in the text working fine.</a> Some more text, some more text, some more text.</p> </div> It is strange, because inside .summary I do have <p> and <a> tags, but <a> is only for the content (because there is a link in the referred article itself). But I don't have "view more" at the end of the summary. Thank you very much for your help in advance!
  3. OK, so the host provider told me that I had done something wrong (had chosen the wrong server) when creating the database, then just a minute later they informed me that they have corrected the error. (?) This made it possible to log in to phpMyAdmin, and import my db without any problems, but the frontend was still inaccessible giving me 404 error (as far as I got it, it was some kind of mismatch between index.php and config.php). No magic helped there, so I deleted all the site files via FTP, then reuploaded them. Of course, here I needed to modify config.php accordingly (as I reuploaded a localhost installed site). After this step, my frontend came alive & working. Still struggling with some minor issues, but that is for another day.
  4. @EntitySelf @cstevensjr @abdus thank you all for taking your time trying to help me. I have contacted my hosting provider, and refer back if I get any information of interest.
  5. I received 404 after having run your script (which I have placed into the site directory as you suggested). I haven't touched IP-addresses.
  6. OK, I haven't yet seen the third version that you have posted here, but now tried with that one. It says now: " 404 page not found (no site configuration or install.php available) "
  7. I have tried with the updated version, and I am getting the very same error message as above.
  8. I get this: " Warning: mysql_connect(): Access denied for user '...'@'[IP]' (using password: YES) in /.../dbtest.php on line 8 Unable to Connect to 'sql' " - so in this case the problem most probably lies at the histing provider side, ami I right?
  9. Hello, I've been trying to move a site from localhost to live environment. I have done everything step by step as Ryan suggested here. I get the following error message: "Exception: SQLSTATE[28000] [1045] Access denied for user" (see attached image). What I have tried / made sure about: my db credentials in site/config.php are OK, I have checked a thousand times $config->userAuthSalt untouched changed $config->httpHosts value (from array('localhost'); to array('mydomain.hu'); ) I have deleted then reuploaded all site files .htaccess contains only the default ProcessWire directives, nothing else special emptied the site/assets/sessions folder searched this forum and Google extensively before posting... ...and still getting the error. This was just a regular localhost installation on wamp with no exotic settings like multisite, etc. Could you please point me in the right direction? Thank you very much in advance.
  10. I still seem to be stuck with this. I most probably misplace something, but what I get as a result is the right URLs, the right titles BUT the very same image for all of my categories (see attachment). The image that is displayed belongs to the last category (the one with the highest ID), bit it is displayed for all the 3 of them. even though they all have their respective images. For test purposes, if I display the ID on the frontend, I get the ID of the last category for all the 3 categories. The relevant part of my code (based on your original renderNav() function) looks like this: (because I need to display the images together with the urls and category titles, I suppose that this is where I should get my blog category images as well, and not in a separate loop). foreach($nav as $url => $title) { $imagelocation = $page->blog_category_image->url; if($url == $currentURL) $out .= "<li class='on category-item'> <a class='on category-box' href='$url'> <img src='$imagelocation' /> <span class='category-title'>$title</span> <span></span> </a> </li>"; else $out .= "<li class='category-item'> <a class='category-box' href='$url'> <img src='$imagelocation' /> <span class='category-title'>$title</span> <span></span> </a> </li>"; } I greatly appreciate your help.
  11. This might be more of a PHP-question, but strongly related to the renderNav() function of the blog module. My blog starting page enumerates my Categories using renderNav(), which works fine (only a category list, no post-listing here yet). But to add a visual tweak to it, I have added an image to each of my categories (one single image to each of the categories, each has its own). Now what I need is a modified html output so that the images should be clickable blocks instead of just the category titles. (Category titles would show up on the image with some transparent background). I think this is quite a frequent visual pattern. My template file looks like this: $blog = $modules->get('MarkupBlog'); $urls = $pages->find('template=blog-category, limit=0'); $category_list = $blog->renderNav('', $urls, '', false); $content = $category_list; ...and output html by $content should look like something like this (instead of just a simple list now) : <li> <a href="[category-url]" class="category-box"> <img src=[blog-category-img-url] /> <span class="category-title">[category title here]</span> </a> </li> ...and then I can write the necessary CSS to accomplish the desired visual output. So how do I go about it? How do I make (or extend) renderNav() to give me an output like this? Basically, I want it to get not just the title but my "blog_category_image" custom field, too. Any help is greatly appreciated.
  12. @kongondo, I have one more question. I have not found an option in the admin backend to modify whether I want to output the number of comments on the top or at the bottom. I have found this part of the markup in the MarkupBlog.module, where it refers to $commentsCountTop and $commentsCountBottom boolean variables, so I suppose they should exist as a setting somewhere... I've been looking for this a whole day back and forth, but can't find it... It would be easy to just modify MarkupBlog.module accordingly, but 1. it would contradict the logic (why would this option be a variable then?) 2. I suppose that it got overwritten during a possible update. Thank you in advance.
  13. Yes, thank you meanwhile I realized this being the problem, so the blog is up and running by now, waiting for my content...
  14. Hi All, I am mainly specialized in frontend-development and have limited experience with PHP. I just started out with Processwire, so my problem might be really basic and specific to the "PW-logic", but now I feel I got stucked with the below problem. I am trying to rebuild a site (previously WP) on localhost, and I am looking to set up a blog within this. All my "normal" pages are showing up fine, except the blog. When navigating to the blog, a white screen is rendered. My page header (menu, search box...) and footer aren't rendered either. HTTP status is 200 (OK). Kongondo's blog components (MarkupBlog, ProcessBlog) are installed, I have read the instructions and everything went fine with the installation, my Apache and PW logs having been both error-free regarding this case. I have turned on debugging in config.php. I have an "Example post" with some dummy content, so that one at least should be visible. In my templates folder, the blog-related files are empty except for the comments ("* A blank template file to get you up and running quickly with your Blog *"). However, in site\modules\MarkupBlog, I have files with regular php-codes. In templates, I have "blog", within which I have two fields, "title" and "blog_body". Do I miss something regarding templates and template-files? Or is it a different issue? Thank you in advance!
  • Create New...