Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 206
Total: 207

Author Topic: [Mod] Simple Blog  (Read 187445 times)

0 Members and 1 Guest are viewing this topic.

Offline jklapp

  • Member
  • *
  • Posts: 45
    • View Profile
Re: [Mod] Simple Blog
« Reply #75 on: October 19, 2006, 02:14:35 am »
Hmmm... I just noticed when viewing a blog (under Recent Blogs) Each recent blog is entered twice?

No more double posts :)

My original sources/simpleblog.php was

Quote
//Begin Simple Blog Mod (display recent blogs)

         $no_of_days = $modSettings['no_of_days_recent_blogs'];
         $blog_qty = $modSettings['no_of_recent_blogs'];
         $now =  time();//mktime()-($modSettings['time_offset'] * 3600);
         $last = mktime(0,0,0,date("m"),date("d")-$no_of_days,date("Y"));

//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, t.value, t.variable
                FROM {$db_prefix}simple_blog as b, {$db_prefix}members AS m, {$db_prefix}themes AS t
                WHERE date BETWEEN $last AND $now
                AND b.ID_MEMBER = m.ID_MEMBER
                AND variable = 'hide_blog'
                ORDER BY ID_BLOG DESC LIMIT $blog_qty", __FILE__, __LINE__);
         
                $context['blog'] = array();             

 while($row = mysql_fetch_assoc($dbresult))
        {
      $context['blog'][] = array(                 
        'ID_BLOG' => $row['ID_BLOG'],
        'subject' => $row['subject'],
        'ID_MEMBER' => $row['ID_MEMBER'],
        'date' => timeformat($row['date']),
        'realName' => $row['realName'],
        'hide_entry' => $row['hide_entry']
                                );
        }
 mysql_free_result($dbresult);
 //End Simple Blog Mod (display recent blogs)

Changed sources/simpleblog.php to

Quote
//Begin Simple Blog Mod (display recent blogs)

         $no_of_days = $modSettings['no_of_days_recent_blogs'];
         $blog_qty = $modSettings['no_of_recent_blogs'];
         $now = mktime()-($modSettings['time_offset'] * 3600);
         $last = mktime(0,0,0,date("m"),date("d")-$no_of_days,date("Y"));

                 //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 date BETWEEN $last AND $now
                AND b.ID_MEMBER = m.ID_MEMBER
                ORDER BY ID_BLOG DESC LIMIT $blog_qty", __FILE__, __LINE__);
         
                $context['blog'] = array();             

 while($row = mysql_fetch_assoc($dbresult))
        {
      $context['blog'][] = array(                 
        'ID_BLOG' => $row['ID_BLOG'],
        'subject' => $row['subject'],
        'ID_MEMBER' => $row['ID_MEMBER'],
        'date' => timeformat($row['date']),
        'realName' => $row['realName'],
        'hide_entry' => $row['hide_entry']

                                );
        }

 //End Simple Blog Mod (display recent blogs)

No more double posts :)

Made the same changes to sources/boardindex.php and there is not more double entries in the Forum Info Center. :)

Offline jklapp

  • Member
  • *
  • Posts: 45
    • View Profile
Re: [Mod] Simple Blog
« Reply #76 on: October 19, 2006, 09:26:25 am »
Is there a way to put the most recent blogs link (like the one in the Forum Info Center) in a block?

Thanks :)

Offline choo

  • Member
  • *
  • Posts: 2
    • View Profile
Re: [Mod] Simple Blog
« Reply #77 on: October 26, 2006, 07:38:47 am »
I installed this mod last night and my users love it, but I'm seeing one slight problem, it seems that users can't see comments in other peoples blogs. I'm probably missing something really simple (its usually the case), but someone pointing me towards teh button i've forgotten to check would be really great. Thanks in advance.

Offline choo

  • Member
  • *
  • Posts: 2
    • View Profile
Re: [Mod] Simple Blog
« Reply #78 on: October 26, 2006, 07:49:25 am »
Never mind, its all sorted now :)

Offline maime

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 1
    • View Profile
Re: [Mod] Simple Blog
« Reply #79 on: November 01, 2006, 05:37:24 pm »
Is there a way to put the most recent blogs link (like the one in the Forum Info Center) in a block?

Thanks :)

in the top of your custom php file( if you want to show it siomewhereelse or in a sidbar of your site
<?php require("/yourhome/xxxxx/public_html/your forumdir/SSI.php"); ?>


///then somewhere in your file.

 
Code: [Select]
<?php 
//Begin Simple Blog Mod (display recent blogs)

                      
echo '<div class="blogtitlebg">' $txt['recent_blog'] . '</div><br />';

      foreach (
$context['blog'] AS $blogs)
                 {       
      if (
$blogs['hide_entry'] == '1' || $blogs['hide_entry'] == '2' && $u == $ID_MEMBER)
           {            
 echo '<div class="smalltext">
<a href="'
$scripturl'?action=viewblog;u=' $blogs['ID_MEMBER']  . ';id=' $blogs['ID_BLOG'] . '" ><b>' $blogs['subject'] . '</b></a> by <a href="'$scripturl ,'?action=profile;u='$blogs['ID_MEMBER'] ,'">' $blogs['realName'] .'</a></div>';
       echo 
'<div class="smalltext">' .$blogs['date'] .'</div><br />';
           }
                 }

//End Simple Blog Mod (display recent blogs)?>


its gonna look abit like this
http://www.flyingpighostels.com/forum/index.php?action=viewblog;u=9;id=6

Offline JoomLaTiDa

  • Member
  • *
  • Posts: 1
    • View Profile
Re: [Mod] Simple Blog
« Reply #80 on: November 04, 2006, 11:41:12 am »
Great looking mod.. seems to work great with an smf only install, and works well with Tiny Portal.

Now the bad news (for me at least)...

I am running a Joomla 1.0.11 site with the RC3 SMF being bridged by the Joomlahacks bridge. It is not working well there at all.

1> Smileys don't show at all, not while your editing, and not while your viewing. Just shows the word codes.

2> I am using smf in a 'wrapped' mode so it appears within my site template. The blog when displayed or viewed 'breaks' the template by going outside the template boundries. I looked thru the blog template files and it appears all your widths are percentages and not fixed pixels, so it SHOULD fit, but doesn't. And it's not a word wrap issue, the size of the 'box' just extends far outside the template.

3> When editing or posting a blog, it tends to break out of its wrapping and goes full screen smf, with no navigation back to my site, or any of the other 'wrappings'.

4> I am getting double listings in the recent blog section as well. I have only installed it once. It looked fine after viewing a few times, this morning I log on and all my test posts are displaying twice.

Any ideas for any of these?? Seems there is a fix posted by  someone who fixed their double posting, but the wrapping issues are a different matter which I hope won't go un-noticed because it's not a default smf install.

Joomla is great, but has NO blogging componants that work, or are ugly and hard to use. This looked like a great alternative, but unless I want no smileys, unwrapped forum and double displays, guess my search/wait is not over....

Offline jklapp

  • Member
  • *
  • Posts: 45
    • View Profile
Re: [Mod] Simple Blog
« Reply #81 on: November 06, 2006, 01:21:30 pm »
Is there a way to put the most recent blogs link (like the one in the Forum Info Center) in a block?

Thanks :)

in the top of your custom php file( if you want to show it siomewhereelse or in a sidbar of your site
<?php require("/yourhome/xxxxx/public_html/your forumdir/SSI.php"); ?>


///then somewhere in your file.

 
Code: [Select]
<?php 
//Begin Simple Blog Mod (display recent blogs)

                      
echo '<div class="blogtitlebg">' $txt['recent_blog'] . '</div><br />';

      foreach (
$context['blog'] AS $blogs)
                 {       
      if (
$blogs['hide_entry'] == '1' || $blogs['hide_entry'] == '2' && $u == $ID_MEMBER)
           {            
 echo '<div class="smalltext">
<a href="'
$scripturl'?action=viewblog;u=' $blogs['ID_MEMBER']  . ';id=' $blogs['ID_BLOG'] . '" ><b>' $blogs['subject'] . '</b></a> by <a href="'$scripturl ,'?action=profile;u='$blogs['ID_MEMBER'] ,'">' $blogs['realName'] .'</a></div>';
       echo 
'<div class="smalltext">' .$blogs['date'] .'</div><br />';
           }
                 }

//End Simple Blog Mod (display recent blogs)?>


its gonna look abit like this
http://www.flyingpighostels.com/forum/index.php?action=viewblog;u=9;id=6

This works great!!! Thank you :)

Offline jklapp

  • Member
  • *
  • Posts: 45
    • View Profile
Re: [Mod] Simple Blog
« Reply #82 on: November 07, 2006, 01:02:08 pm »
Looks like I spoke to soon :(

I run Enigma 2.0 (RC1) and when I put the code below in a custom block it displayed the recent blogs... But then I noticed it only displays the recent blogs in the block when either viewing a blog or when viewing the forum main page... They do not display anywhere else????

Quote
                      echo '<div class="blogtitlebg">' . $txt['recent_blog'] . '</div><br />';

      foreach ($context['blog'] AS $blogs)
                 {       
      if ($blogs['hide_entry'] == '1' || $blogs['hide_entry'] == '2' && $u == $ID_MEMBER)
           {           
  echo '<div class="smalltext">
  <a href="', $scripturl, '?action=viewblog;u=' . $blogs['ID_MEMBER']  . ';id=' . $blogs['ID_BLOG'] . '" ><b>' . $blogs['subject'] . '</b></a> by <a href="', $scripturl ,'?action=profile;u=', $blogs['ID_MEMBER'] ,'">' . $blogs['realName'] .'</a></div>';
       echo '<div class="smalltext">' .$blogs['date'] .'</div><br />';
           }
                 }

Offline Fay

  • Member
  • *
  • Posts: 1
    • View Profile
Re: [Mod] Simple Blog
« Reply #83 on: November 30, 2006, 07:06:18 am »
I installed SimpleBlog perfectly fine on SMF RC3. I found out the link to the users' blogs but I was wondering where the members would be able to access the blog, because right now, I have to manually type in

http://domain.com/index.php?action=viewblog;u=membernumber

Is it possible for the members to see their own link on their profile automatically? Sorry for the bother >.<

Offline howlerckc

  • Member
  • *
  • Posts: 7
    • View Profile
    • CityWX.com Weather and News
Re: [Mod] Simple Blog
« Reply #84 on: December 02, 2006, 01:19:08 pm »
Another Idea for the Simple Blog, Include an RSS Feed for the Individual Blog, as well as an Auto Ping system for it.

Offline donald20

  • Member
  • *
  • Posts: 3
    • View Profile
Re: [Mod] Simple Blog
« Reply #85 on: December 03, 2006, 06:06:46 pm »
hi

great job, unfortunatly this hack wont work with ver 1.1 i always receive errors by installing it.

this gmod is one of our main features in our forum, could you please uprgrade it.. so that it will work with ver 1.1 thanks in advance

donald

Offline BJ05

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Simple Blog
« Reply #86 on: December 04, 2006, 10:33:15 pm »
hi

great job, unfortunatly this hack wont work with ver 1.1 i always receive errors by installing it.

this gmod is one of our main features in our forum, could you please uprgrade it.. so that it will work with ver 1.1 thanks in advance

donald

I will second this request.....A quickly pleeeezzzz

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: [Mod] Simple Blog
« Reply #87 on: December 04, 2006, 10:46:18 pm »
Updated the mod so it installs on SMF 1.1
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline BJ05

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Simple Blog
« Reply #88 on: December 04, 2006, 10:50:22 pm »
Damn! Gives me the warm and fuzzies! And now I shall celebrate this accomplishment with an install of this excellent mod and raise a glass or four of another most excellent accomplishment, Havana Club Reserva Anejo 20 year old sipping rum from Uncle Fidel's island paradise in honor of SIMPLEBLOG, and perhaps Uncle Fidel's birthday and impending death.

Offline BJ05

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Simple Blog
« Reply #89 on: December 04, 2006, 11:02:39 pm »
Ok, finding a major problem here.

Installs perfectly under 1.1. But when you try to implement it from the admin panel, (ticking the check box to enable Simple Blogs) and click save, nothing happens. You go back into ACP and Simple Blogs, and the check box is blank.

Also, changes made to the SB options have reverted to default.
Ideas?
« Last Edit: December 04, 2006, 11:04:59 pm by BJ05 »

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
13291 Views
Last post September 19, 2006, 09:25:37 am
by lisah746
9 Replies
13840 Views
Last post January 28, 2007, 12:54:40 pm
by doctoreast
1 Replies
6059 Views
Last post February 19, 2007, 08:34:02 pm
by SlaveToThis
6 Replies
10904 Views
Last post May 11, 2007, 02:18:33 pm
by asklife
5 Replies
6201 Views
Last post July 17, 2007, 02:33:51 am
by KnightRobby

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal