<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - User Diaries 1.1]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/17982/"/>
	<updated>2009-05-11T16:17:18Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/17982/user-diaries-11/</id>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127583/#p127583"/>
			<content type="html"><![CDATA[<p>Actually very easy - you can just make use of the snippet() function found in diary_extern.php</p><p>Here it is:</p><div class="codebox"><pre><code>function snippet($text,$length=20,$tail=&quot;...&quot;) {
    $text = trim($text);
    $txtl = strlen($text);
    if($txtl &gt; $length) {
        for($i=1;$text[$length-$i]!=&quot; &quot;;$i++) {
            if($i == $length) {
                return substr($text,0,$length) . $tail;
            }
        }
        $text = substr($text,0,$length-$i+1) . $tail;
    }
    return $text;
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2009-05-11T16:17:18Z</updated>
			<id>http://punbb.informer.com/forums/post/127583/#p127583</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127573/#p127573"/>
			<content type="html"><![CDATA[<p>Perfect... It&#039;s work! Thanks a lot for this code modification ;-) I understand your advices but for a &quot;small&quot; project where I know all Users who are allowed to post diaries and they are not talkative ;-) this feature is really interresting... Thank</p><p>May be! a better solution will be to cut all that... is not ?<br />Like there is here (diary_extern.php) in fact...<br /></p><div class="codebox"><pre><code>$UD_snip_entry = &quot;200&quot;;  // Shortens string - default = 200</code></pre></div><p>But it is to difficult to do ;-) for me</p>]]></content>
			<author>
				<name><![CDATA[Pame]]></name>
				<uri>http://punbb.informer.com/forums/user/15142/</uri>
			</author>
			<updated>2009-05-10T21:43:48Z</updated>
			<id>http://punbb.informer.com/forums/post/127573/#p127573</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127568/#p127568"/>
			<content type="html"><![CDATA[<p>The &#039;show all user&#039;s entries&#039; page is supposed to be a compact view of that user&#039;s diary entries - that&#039;s why it does not include line breaks.</p><p>I also did not allow it to display img tag BBCode, since the idea was to display only one image per diary entry (the uploaded image).</p><p>But if you really want to do that do that, here is how (but I don&#039;t recommend it):</p><div class="codebox"><pre><code>#
#---------[ 1. OPEN ]---------------------------------------------------------
#

diary.php


#
#---------[ 2. FIND (line: 737) ]---------------------------------------------
#

//============= START PARSER =============
...
...
...
//============= END PARSER =============


#
#---------[ 3. REPLACE WITH ]---------------------------------------------------
#

    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    $text = parse_message($text, 0);
    echo $text;


#
#---------[ 4. FIND (line: 312) ]---------------------------------------------
#

//============= START PARSER =============
...
...
...
//============= END PARSER =============


#
#---------[ 5. REPLACE WITH ]---------------------------------------------------
#

    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    $text = parse_message($text, 0);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2009-05-10T17:10:14Z</updated>
			<id>http://punbb.informer.com/forums/post/127568/#p127568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127423/#p127423"/>
			<content type="html"><![CDATA[<p>It is solved my error with diary_extern.php (cf your post @ PunRes)</p><p>But I &#039;ve got always a problem with this &#039;Image&#039; BBCode tag !</p><p>And... I do not know how to apply &quot;line return&quot; at the diaries listing</p><p>Please ;-)) Could you help me ?</p>]]></content>
			<author>
				<name><![CDATA[Pame]]></name>
				<uri>http://punbb.informer.com/forums/user/15142/</uri>
			</author>
			<updated>2009-05-05T19:19:21Z</updated>
			<id>http://punbb.informer.com/forums/post/127423/#p127423</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127414/#p127414"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Koos wrote:</cite><blockquote><p>You might be able to make use of the <a href="http://www.punres.org/viewtopic.php?pid=24639#p24639">diary_extern.php</a> page I created for this mod. It can display the latest 5/10/15 etc diary entries on any page.</p></blockquote></div><p>Great but when I tried...</p><div class="codebox"><pre><code>Warning: main(PUN_ROOTinclude/parser.php) [function.main]: failed to open stream: No such file or directory in /home/mylogin/www/forum/diary_extern.php on line 22

Fatal error: main() [function.require]: Failed opening required &#039;PUN_ROOTinclude/parser.php&#039; (include_path=&#039;.:/usr/share/php4:/home/xxx/yyy/zzz&#039;) in /home/mylogin/www/forum/diary_extern.php on line 22</code></pre></div><p>an idea ? (php5 is it required ?)</p><p>Ps: This &quot;PUN_ROOTinclude/parser.php&quot; is strange ;-) not ? may be with an &quot;/&quot; before include</p>]]></content>
			<author>
				<name><![CDATA[Pame]]></name>
				<uri>http://punbb.informer.com/forums/user/15142/</uri>
			</author>
			<updated>2009-05-05T04:39:05Z</updated>
			<id>http://punbb.informer.com/forums/post/127414/#p127414</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127413/#p127413"/>
			<content type="html"><![CDATA[<p>And... at the Diaries listing, Line breaks are not displayed in the Diary&#039; Content (like it is at the Diary individual view in fact)</p><p>But... please, could you tell me how do that ? thanks again in advance</p>]]></content>
			<author>
				<name><![CDATA[Pame]]></name>
				<uri>http://punbb.informer.com/forums/user/15142/</uri>
			</author>
			<updated>2009-05-05T04:22:38Z</updated>
			<id>http://punbb.informer.com/forums/post/127413/#p127413</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/127412/#p127412"/>
			<content type="html"><![CDATA[<p>Hi. Thank for that...</p><p>But I &#039;ve got a problem with &#039;Image&#039; BBCode</p><p>I entered this BBCode but my image is not inserted (I see in my Diary, this BBCode below in fact!)<br /></p><div class="codebox"><pre><code>[img]http://www.xyz.com/images/photo-0023.jpg[/img]</code></pre></div><p>Other BBCodes seem Ok</p><p>PS: FluxBB 1.2.21 (BBCode allowed) - User Diarie 1.1.2 (BBCode allowed too ;-))</p>]]></content>
			<author>
				<name><![CDATA[Pame]]></name>
				<uri>http://punbb.informer.com/forums/user/15142/</uri>
			</author>
			<updated>2009-05-05T03:28:56Z</updated>
			<id>http://punbb.informer.com/forums/post/127412/#p127412</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/123494/#p123494"/>
			<content type="html"><![CDATA[<p>I&#039;m installing this mod but one feature I recommend is directory hashing on the image folders. I have 30,000+ members and even with only a few thousand highly active members writing diaries, the images folder will get bogged down.</p><p>P.s.&nbsp; Directory hashing is also lacking in punbb avatars folder, I made a custom solution to this myself since my avatars folder had 30,000+ images in it.</p>]]></content>
			<author>
				<name><![CDATA[mixart]]></name>
				<uri>http://punbb.informer.com/forums/user/12206/</uri>
			</author>
			<updated>2009-01-26T09:30:14Z</updated>
			<id>http://punbb.informer.com/forums/post/123494/#p123494</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/117908/#p117908"/>
			<content type="html"><![CDATA[<p>You might be able to make use of the <a href="http://www.punres.org/viewtopic.php?pid=24639#p24639">diary_extern.php</a> page I created for this mod. It can display the latest 5/10/15 etc diary entries on any page. With some simple modifications you would be able to set it to display the latest diary entries of each user in their profile.</p>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2008-10-01T21:30:13Z</updated>
			<id>http://punbb.informer.com/forums/post/117908/#p117908</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/117773/#p117773"/>
			<content type="html"><![CDATA[<p>Looks like a great mod and I might implement it, however one feature that makes the most sense to me...<br />- Adding a list of the latest 5 diary entry titles to each users profile page so when you view a users profile you see...</p><p>Latest User Diary entries:<br />- 1/1/2008 I ate a hotdog today<br />- 1/1/2008 I hate school<br />- 1/1/2008 Tell me what you think about this<br />View all &gt;</p>]]></content>
			<author>
				<name><![CDATA[mixart]]></name>
				<uri>http://punbb.informer.com/forums/user/12206/</uri>
			</author>
			<updated>2008-09-24T21:28:48Z</updated>
			<id>http://punbb.informer.com/forums/post/117773/#p117773</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/116743/#p116743"/>
			<content type="html"><![CDATA[<p><strong>User Diaries v1.1.1 now available.</strong> There was a bug to fix on the diary edit page. Also make a change in how the small envelope shown next to the diary poster&#039;s name is displayed. Now it will display correctly in all style sheets.</p>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2008-07-16T18:55:05Z</updated>
			<id>http://punbb.informer.com/forums/post/116743/#p116743</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/114952/#p114952"/>
			<content type="html"><![CDATA[<p>User Diaries v1.1.0 now available. See changelog above for changes.</p>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2008-05-17T17:40:21Z</updated>
			<id>http://punbb.informer.com/forums/post/114952/#p114952</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/113731/#p113731"/>
			<content type="html"><![CDATA[<p>User Diaries v1.0.1 now available. Made a few fixes and improvements. Thanks to D.S. Denton for the Russian lang file. Also updated the French lang file.</p>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2008-04-18T20:56:35Z</updated>
			<id>http://punbb.informer.com/forums/post/113731/#p113731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[User Diaries 1.1]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106804/#p106804"/>
			<content type="html"><![CDATA[<div class="codebox"><pre><code>##
##        Mod title:  User Diaries
##
##      Mod version:  1.1.1
##   Works on PunBB:  1.2.*
##     Release date:  2008-07-16
##           Author:  Koos (pampoen10@yahoo.com)
##
##      Description:  Allows users to post diaries with images.
##
##   Affected files:  none
##                                     
##       Affects DB:  New tables:
##                       &#039;diary&#039;
##                       &#039;diary_perms&#039;
##                       &#039;diary_reports&#039;
## 
##            Notes:  Requires the GD library on your Web server. Script can
##                    upload JPEG, PNG AND GIF images.
##
##       DISCLAIMER:  Please note that &quot;mods&quot; are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
################################################################################
## CHANGELOG:
## 1.1.1 : fixed a bug on the edit page
##         minor style change
## 1.1.0 : can now edit your diary entries
##         added BBCode functionality
## 1.0.1 : some minor fixes and improvements
##         made changes to the English lang file
## 1.0   : initial release 
################################################################################</code></pre></div><p>I have finally completed the User Diaries mod which I have been working on for some time now. Happy to say that it turned out the way I intended. The idea was to keep it simple - and make it easy to navigate. Thanks to those who helped test the pre-release version.</p><p>Features:<br />* All pages valid XHTML strict<br />* Valid RSS 2.0 feed for all user diaries<br />* Can upload images with diary entries<br />* Easy to install and uninstall<br />* Users can report diary entries<br />* Permission control<br />* Diary statistics for admin</p><p><a href="http://www.punres.org/files.php?pid=467">Download from punres.org</a></p>]]></content>
			<author>
				<name><![CDATA[Koos]]></name>
				<uri>http://punbb.informer.com/forums/user/9972/</uri>
			</author>
			<updated>2008-01-11T21:10:08Z</updated>
			<id>http://punbb.informer.com/forums/post/106804/#p106804</id>
		</entry>
</feed>
