News:

Join the Facebook Fan Page.

Main Menu

Simple Blog

Started by Little 15, September 07, 2006, 09:50:06 AM

Previous topic - Next topic

Vinspire

Quote from: Dayu on September 08, 2006, 11:23:56 AM
Hi, Thanks!
I've been waiting for a mod like this.  :D

1. Can you make each new blog entry appear in the Forum Info Center?
2. Can you make each member's blog appear in a certain forum board so we won't have to click the username of a member and find out about his blog entries. What I'm talking about is something like this:

http://finespot.net/english/index.php?action=collapse;c=1;sa=collapse;#1

I second this suggestion  :D ;D

Little15

I am actually working on a way to show new blogs on the main page. But I'll see if I can work that out as well.

Also I was wondering if I should put signatures at the bottom of blog entries or leave it off?

Vinspire

Quote from: Little 15 on September 12, 2006, 01:17:44 AM
I am actually working on a way to show new blogs on the main page. But I'll see if I can work that out as well.

Also I was wondering if I should put signatures at the bottom of blog entries or leave it off?

I don't think putting it to display on the signatures would be a good idea as it would look super messy when they have a lot of blog articles and everyone have their blogs ... Like text everywhere  ;D

What about making it something like vbgamers SMF Traders mod ?


chinclub

This mod looks great!

I have two questions and I am using SMF 1.1 RC3 by the way. 

#1:
I have the profile comments mod (which this one is based on) already installed.  Would I have to remove that first or can they work together on the same board.  I only hesitate to remove it because people will loose their current comments.


#2:
Does this mod allow the person to receive an email or a pm when someone makes a comment on their blog?


Little15

Quote from: chinclub on September 12, 2006, 09:44:38 AM
This mod looks great!

I have two questions and I am using SMF 1.1 RC3 by the way. 

#1:
I have the profile comments mod (which this one is based on) already installed.  Would I have to remove that first or can they work together on the same board.  I only hesitate to remove it because people will loose their current comments.

Both should work fine!

Quote from: chinclub on September 12, 2006, 09:44:38 AM

#2:
Does this mod allow the person to receive an email or a pm when someone makes a comment on their blog?



This I am hoping to have done in the next version.

L.G.S

This looks good thanks, although I'm not too fond of the layout
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Syndel

Hi :)
I have SMF RC3+TP and had installation error:

2.     Execute Modification     ./Themes/default//Profile.template.php     Test failed

Little15

Quote from: Syndel on September 12, 2006, 04:26:17 PM
Hi :)
I have SMF RC3+TP and had installation error:

2.     Execute Modification     ./Themes/default//Profile.template.php     Test failed

Tinyportal shouldn't affect it. Do you have any other mods installed?

Syndel

Yeah I have 40 other mods....
I ended up installing it manually :P
Works great! Thanks so much... is a great mod :)

chinclub

Which one is for RC3?  I just downloaded 108 and it said it was corrupt or not compatable. :(

chinclub

Nevermind!  I was installing the wrong one.  I did the right one but now it is telling me test failed for Profile.template.php

How do I install it manually?

Little15

Find:

global $context, $settings, $options, $scripturl, $modSettings, $txt;

// First do the containing table and table header.


Add:

global $db_prefix,$ID_MEMBER;


Find:

<td class="windowbg2" colspan="2">';
if (!$context['user']['is_owner'] && $context['can_send_pm'])
echo '
<a href="', $scripturl, '?action=pm;sa=send;u=', $context['member']['id'], '">', $txt[688], '.</a><br />
<br />';
echo '
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">', $txt[460], ' ', $txt[461], '.</a><br />
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=statPanel">', $txt['statPanel_show'], '.</a><br />
<br />
</td>
</tr>
</table>';


Remove the </table> And Add After the ';

//Start Simple Blog Mod

        function archive()
       {
       global $db_prefix, $context, $scripturl, $hide_entry, $txt;

       $u = $context['member']['id'];

       $dbresult = db_query("SELECT date, ID_BLOG, hide_entry FROM {$db_prefix}simple_blog WHERE  ID_MEMBER = " . $u . " ORDER BY ID_BLOG DESC", __FILE__, __LINE__);

       echo'
              <select name="archive" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">';

echo'
             <option value="">', $txt['blog_archive'] ,'</option>';
               if($context['member']['options']['hide_blog'] == '1' || $context['user']['is_owner'])
                {
             while ($row = mysql_fetch_assoc($dbresult))
            {
            if ($row['hide_entry'] == '2' && $context['user']['is_owner'] || $row['hide_entry'] == '1')
                             {

             $blog = $row['ID_BLOG'];
             $blogdate = $row['date'];
             $time = date("d/m/Y", $blogdate);

             echo '<option value="?action=viewblog;u=', $u ,';id=', $blog,';">', $time, '</option>';
            }
                             }
            echo '</select>';
                   }
        }

      echo'
<tr class="titlebg" style="padding-bottom:1ex;" width="100%"><td height="16" width="70%">',$txt['blog'],' -
', $context['member']['name'] ,'&nbsp;&nbsp;
', archive() ,'</td><td class="smalltext" width="30%" align="right">';
                 if(allowedTo('pblog_add') && $context['user']['is_owner'])
                {
echo '<a href="', $scripturl, '?action=blog;sa=add;u=' . $context['member']['id'] . '">',$txt['blog_add_new_blog'],'</a><br />';
                }     
                echo '<a href="', $scripturl, '?action=viewblog;u=' . $context['member']['id'] . '">',$txt['blog_view_all'],'</a></td></tr>';


               if($context['member']['options']['hide_blog'] == 2 && !$context['user']['is_owner'])
                {
                 echo '<tr><td colspan="2" class="windowbg"><div>',$txt['blog_is_private'],'</div></td></tr>';
                 }
                 else
                 {

                 //Loop though all the blog entries

                $dbresult = db_query("SELECT b.ID_BLOG, b.ID_MEMBER, b.blog, b.subject, b.date, m.realName, b.hide_entry FROM {$db_prefix}simple_blog as b, {$db_prefix}members AS m WHERE  b.ID_MEMBER = m.ID_MEMBER AND BLOG_MEMBER_ID = " . $context['member']['id'] . " ORDER BY ID_BLOG DESC LIMIT 5", __FILE__, __LINE__);
$blog_count = db_affected_rows();
while($row = mysql_fetch_assoc($dbresult))
{
                  if ($row['hide_entry'] == '2' && $context['user']['is_owner'] || $row['hide_entry'] == '1')
                             {
                 $ID_BLOG = $row['ID_BLOG'];
                 $count = mysql_query("SELECT * FROM {$db_prefix}simple_blog_comments WHERE ID_BLOG = $ID_BLOG");
                 $comment_count = mysql_num_rows($count);

echo '<tr class="windowbg"><td width="70%"><a href="', $scripturl, '?action=viewblog;u=' . $context['member']['id']  . ';id=' . $row['ID_BLOG'] . '" >' . $row['subject'] . '</a>';

                 if($comment_count == 1)
                {
                echo "&nbsp;&nbsp;($comment_count comment)";
                 }
                  else
                       {
                        echo "&nbsp;&nbsp;($comment_count comments)";
                        }

               echo'<div class="smalltext">';
if(allowedTo('pblog_edit_any') || allowedTo('pblog_edit_own') && $context['user']['is_owner'] && $row['ID_MEMBER'] == $ID_MEMBER)
{
echo '<a href="', $scripturl, '?action=blog;sa=edit;id=' . $row['ID_BLOG'] . '">',$txt['blog_edit'],'</a>';
}
if(allowedTo('pblog_delete_any') || allowedTo('pblog_delete_own') && $context['user']['is_owner'] && $row['ID_MEMBER'] == $ID_MEMBER)
{
echo '&nbsp;<a href="', $scripturl, '?action=blog;sa=delete;id=' . $row['ID_BLOG'] . '">',$txt['blog_delete'],'</a>';
}

                                echo'</div></td><td class="smalltext"  width="30%">'  . timeformat($row['date']) . '</td></tr>';
                      }
                }
      }
//End Simple Blog Mod
echo '</table>';
    }


Find:

<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>
</tr><tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';


Replace:

<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>
</tr><tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>

<td width="40%"><b>',$txt['blog_options'],'</b></td>
<td>
                        <select name="default_options[hide_blog]"> <option', @$context['member']['options']['hide_blog'] == '1' ? ' selected="selected"' : '', ' value="1">',$txt['blog_public'],'</option>
                <option', @$context['member']['options']['hide_blog'] == '2' ? ' selected="selected"' : '', ' value="2">',$txt['blog_private'],'</option>
                       </select></td>
                </tr><tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>

                </tr>';


This will be made easier for the next version. Which I hope to have released soon. A working demo will be up in the next day or so.

chinclub

Thanks,  I know this is probably a pretty stupid question, but I do go ahead and install the package first then edit the Profile.template.php by hand, correct?

(I'm still alittle new at all of this so I just want to be sure I am doing it right before I screw something up)

Little15

Quote from: chinclub on September 15, 2006, 05:39:34 PM
Thanks,  I know this is probably a pretty stupid question, but I do go ahead and install the package first then edit the Profile.template.php by hand, correct?

(I'm still alittle new at all of this so I just want to be sure I am doing it right before I screw something up)

That would be the best way. You may find that some of the profile.template parts are already there, so there is no need to add them again.

Little15

Preview of 1.3 here for you

1.1RC3

http://www.liquidgarden.org/test

1.0.8

http://www.liquidgarden.org/test/forum

comments and testing welcome. Still looking for those nasty little bugs!

Nic-

it look good , can't wait

keep it up m8, little 15

chinclub

 I havn't gotten around to adding this mod yet since I have to edit the profile  file by hand.  I'm wondering now if it would be easer to wait until this newest release.  I'm assuming the changes to the profile page will be different when I upgrade?  What would be easer?

Little15

Quote from: chinclub on September 17, 2006, 09:25:30 AM
I havn't gotten around to adding this mod yet since I have to edit the profile  file by hand.  I'm wondering now if it would be easer to wait until this newest release.  I'm assuming the changes to the profile page will be different when I upgrade?  What would be easer?

The profile.template on the new version has only two parts two add

1. the make blog private or public options
2. the blog part itself which is now much smaller than the previous version as I made a function in the profile.php file and it calls on that in the profile.template.

So I would say wait.

It should be ready very soon.

Little15


dracomiconia

#39
I cant see entries in the index.....

Or could it be that you can only see other people blog?

http://www.dracomiconia.com/forob/index.php

Advertisement: