Blog not working

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Muzzy

Blog not working

Post by Muzzy »

Hi.
I've installed the CMSBlog module and put this tag in my page

Code: Select all

{cms_module module='Blogs' show="everything"}
And I've attached the CSS file to my template but nothing is showing up.
What am I doing wrong. At the moment it is on my new site I'm developing in a sub-directory located here: http://www.mikemuscroft.com/2007/index.php?mact=Blogs,m3,showblog,1&m3returnid=58

Any help would be appreciated.
Thanks.
Mike.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Blog not working

Post by RonnyK »

Mike,

blog is showing when I use the logic you put in, although I think that the parameter isn't needed, because without it, it shows all. You do have an entry in Blog, to be shown?

Ronny
Muzzy

Re: Blog not working

Post by Muzzy »

Hi Ronny.

I'm just looking at my page via MSIE 7 and Firefox, but I can't see anything other than my welcome message.
I'll drop the param code and see if it makes a diference. I did write a test entry, so not sure why it's not showing?

Thanks for the help.
Mike.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Blog not working

Post by Nullig »

The code (below) for the content on that page looks a bit mixed up, check your Blogs Template.

Code: Select all

<div id="content" class="bg7">
	<div id="box5">
		<div class="title">
			<h2><strong>Blog</strong> </h2>
		</div>
		<div class="content">

                          <p>Welcome to my Blog.</p>
<p><font face="Courier New">
<div id="blogs-showblogsentries">
  </div>
</div></font></p>
		</div>
	</div>
</div>
Nullig
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Blog not working

Post by RonnyK »

Mike,

what does your template "Blogs template" look like, mine is like:

Code: Select all

{if $breadcrumb!=""}
<div id="blogs-breadcrumb">{$breadcrumb}</div>
{/if}

<div id="blogs-showblogsentries">
{if $itemcount>0} {foreach from=$items item=entry}
<div id="blogs-showblogsentry">
<div id="blogs-showblogsentrytime">{$entry->time} {$writtenby} {$entry->author}</div>
<div id="blogs-showblogsentrytitle">{$entry->title}</div>
<div id="blogs-showblogsentryshorttext">{$entry->shorttext}</div>
<!--
  <div id="blogs-showcategoryentrytext">
    {$entry->text}
  </div>
 -->

<div id="blogs-showcategoryentryfiles">{$entry->files}</div>
       
<div id="blogs-showblogsentrycategory">{$entry->categorylink}</div>
<div id="blogs-showblogsentrycomments">{$entry->comments}</div>
</div>
{/foreach} {else} {$noentriestext} {/if}</div>
</div>

Ronny
Muzzy

Re: Blog not working

Post by Muzzy »

Hi Ronny.

Line for line it appears exactly the same, but just in case I replaced my blog template code with yours. Still not showing up.
Perhaps I'm missing something or perhaps I should have done something? Not much by way of instructions comes with this module.

Mike.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Blog not working

Post by RonnyK »

Mike,

did you do anything specific. I just installed, created an entry and put the line of code on a new content-page. I did nothing with styling/captcha etc....

Ronny
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Blog not working

Post by RonnyK »

Mike,

are you running 0.2.0 as I saw some topic on similar problems on 0.1.0.

Ronny
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Blog not working

Post by Nullig »

There's an extra at the end.

Code: Select all

{if $breadcrumb!=""}
<div id="blogs-breadcrumb">{$breadcrumb}</div>
{/if}

<div id="blogs-showblogsentries">
   {if $itemcount>0}
      {foreach from=$items item=entry}
         <div id="blogs-showblogsentry">
            <div id="blogs-showblogsentrytime">{$entry->time} {$writtenby} {$entry->author}</div>
            <div id="blogs-showblogsentrytitle">{$entry->title}</div>
            <div id="blogs-showblogsentryshorttext">{$entry->shorttext}</div>
       <!-- <div id="blogs-showcategoryentrytext">{$entry->text}</div> -->
            <div id="blogs-showcategoryentryfiles">{$entry->files}</div>
            <div id="blogs-showblogsentrycategory">{$entry->categorylink}</div>
            <div id="blogs-showblogsentrycomments">{$entry->comments}</div>
         </div>
      {/foreach}
   {else} 
      {$noentriestext}
   {/if}
</div>
</div>  <-- appears to be unnecessary -->

Nullig
Last edited by Nullig on Fri Apr 27, 2007 8:03 pm, edited 1 time in total.
Muzzy

Re: Blog not working

Post by Muzzy »

Hi Ronny & Nullig.

Ronny.
I did exactly as you mentioned. Installed, created entry, put code in page - no go!!!

Nullig.
Not sure about the extra div or if it would render the blog module from working, but I'll check it out shortly.
Can't access the site as such at the moment as I am in the middle of FTP the new version 6 of CMSMS.
Soon as it's done and I've done the upgrade/install thing, I'll login and check again.

Thanks Guys.
Mike.
Muzzy

Re: Blog not working

Post by Muzzy »

Hi Ronny.

I finished the upgrade to 1.0.6
Loged in and checked, I'm running 0.2.0 blog

I was hoping that perhaps the blog might start working after this minor upgrade, but no.

Any other ideas?
Mike.
abb

Re: Blog not working

Post by abb »

Hi,

It is nice to see blog module is being developed.

patch-itemcount.txt - a patch to fix "empty page" problem, the one Mike is experiencing.
patch-admin.txt - a patch, fixing a few minor glitches in the admin interface.

Another bug: when blog is empty, the module is supposed to display corresponding message, but for some reason it does not.

Also I have noticed that this module is also vulnerable to cross-site-scripting vulnerability, in partucular in the comment submission form. Please note that malicious person may inject pieces of javascript into comment which will be executed by browsers of visitors of the blog as well as blog administrator. One should not put this module on publicly accessible website until this bug is fixed.

Regards,
Alex

--
www.scanit.be


[gelöscht durch Administrator]
Last edited by abb on Sat Apr 28, 2007 12:29 pm, edited 1 time in total.
Muzzy

Re: Blog not working

Post by Muzzy »

Hi Abb.

Thanks for the help.
Can you tell me how and where I apply these 2 patch files?
Do I need to rename them at all?

Thank you.
Mike.
abb

Re: Blog not working

Post by abb »

Hi Mike,

Normally patches are applied with "patch" utility available on unix/linux systems or from Cygwin toolkit on Windows platform. If you don't have it you can do it manually (the format of the patch files is very easy to interpret). Or if you feel comfortable accepting PHP files from strangers, you can also use files patched by myself, see attachment. If you only want to patch "empty page" problem, you only need to get "action.showblog.php" file and place it into modules/Blogs directory. You need to remove .txt extension, I have added it because forum does not allow attaching files with .php extensions.

Here are the basic instructions how to interpret the content of the patch files:

1) Find file to apply the patch to, action.showblog.php in subdirectory modules/Blogs in your cmsms file tree (file name to patch can be found in "---" or "+++" lines of the patch file).

2) Look around line number 28 (line number can be found in "@@ -28,6 +28,7 @@" line in the patch file). you will find a chunk of text resembling

  array_push($entries, $onerow);
}
$this->smarty->assign_by_ref('items', $entries);

3) Right after this file, add a patch (lines starting from + in the patch file are ones which has to be added, you may also find ones prefixed with "-" those you have to remove). In our example you need to add just this line:

$this->smarty->assign('itemcount', count($entries));

the resulting text will look like


  array_push($entries, $onerow);
}
$this->smarty->assign_by_ref('items', $entries);
$this->smarty->assign('itemcount', count($entries));

Cheers,
Alex
--
www.scanit.be


[gelöscht durch Administrator]
Muzzy

Re: Blog not working

Post by Muzzy »

Hi Abb.

Bless you for the most excellent help.
I'm no coder, so what a lot of what you write is wierd to me, but your explanation is top of the class.
I have printed off your tutorial asit where to keep and learn from, never knew of such 'patch' stuff before.

I have downloaded your php files as I feel more comfortable with a straight ftp job.
Will let you know later how I get on, unfortunately I have to go to a party/celebration so I am pressed for time at the moment.

Thanks once again for the help.
Mike.
Locked

Return to “[locked] Installation, Setup and Upgrade”