TinyPortal

Development => Block Codes => Topic started by: Dragooon on October 14, 2007, 10:08:24 AM

Title: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on October 14, 2007, 10:08:24 AM
This was known as "Highly Customizable Recent Posts/Topics, Board News Block" but I renamed it because the previous one sounded to silly :P.
The version 3.0 introduces many new features and optimizations, so updated both, your block code and your File to take its advantage



Features in Version 3.0
# Have 4 modes
# You have the ability to select weather to show from sticky topics only or from all topics
# Can be set to show topics/posts from a defined single board, all the boards, or multiple set of boards
# Can be set to show topics/posts from a defined category, all categories or multiple selected categores
# Easy customization, Every customization is at one place, and is greatly instructed with comments
# Ability to set a character limit to subject
# Ability to show some part of the posts/topics body and ability set its character limit
# Supports all 3 kinds of blocks(Left, Right and Center)
# Works with permission, A user sees what it can see.
# Amount of topics/post to output can be changed
# Supports scroll
# Supports Auto Scroll
# Parses BBC and there is a option weather to Parse Smiley or not
# Have various options to show various attributes of the topic/post.

Kindly Note : Enabling Auto Scrolling will break XHTML Validation. This only applies if you have Auto Scrolling enabled(which is not by default). Rest is XHTML Valid.

Implementation
Step 1 :
Download the PHP File I attached (PostsTopicsSnippet.php) and Upload it to your Sources(/Sources) Directory.
Step 2 :
In a PHP Block add this code
Code: [Select]
// Posts/Topics Snippet
// By Dragooon
// www.gforumx.com
// Version 3.0

//The instructions are posted in the thread of this snippet + they are quite here.

// Lets call the file
global $sourcedir;
require_once($sourcedir . '/PostsTopicsSnippet.php');

// Declare it. There is NO need to edit this part
$boards_id = array();
$cats_id = array();
/************************************
* How To Customize!
************************************/
# This is how to customize the block. To customize this please edit the variable given in the Below function call (postsTopicsSnippet). Do Not edit the variables given in this How To. This How to explains, what is the variable is and what does it do.
# How to Customize is given below.
# Make sure not to remove ANY comma
# Make sure not to remove "array()" part in the $boards_id and $cats_id variables.

# $mode : Mode of the Block
# 1 = Recent Topics
# 2 = Recent Posts
# 3 = Top Viewed
# 4 = Top Replied

# $boards_id : ID Of Boards to show the posts/topics from
# Do Not remove array() part, Insert the ID(s) of boards you want posts to show from.
# Use comma ( , ) as a separator
# Example : $boards_id = array(1, 2, 3)
# Leave empty to grab posts from all boards

# $cats_id : ID Of categories to show the posts/topics from
# Do Not remove array() part, Insert the ID(s) of categories you want posts to show from.
# Use comma ( , ) as a separator
# Example : $cats_id = array(1, 2, 3)
# Leave empty to grab posts from all categories

# $stickyOnly : Weather to get the topics which are sticky only or not
# true : yes
# false : no

# $limit : Maximum no. of topics/posts to show

# $subjectLength : Max characters the subject can have.

# $bodylength : Max characters the subject can have
# Setting it to 0 will result showing of no body.

# Below are some configuration variables
# For these, if set to true, it means Yes.
# If set to false, it means no.

# $parseSmileys : Weather to parse smileys or not

# $show_board : Weather to show the board the topic/post is posted in or not

# $show_views : Weather to show the no. of views or not

# $show_replies : Weather to show the no. of replies or not

# $show_category : Weather to show category or not

# $show_author : Weather to show the author who posted this or not

# $show_newIcon : If the post is unread, weather to show the New Icon or not

# $show_time : Weather to show the time the post/topic is posted on or not

# $scroll : If the height it longer than 40 pixels, weather to make it as a scroll or not

# $aScroll : Weather to make it auto scroll or not
# NOTE : If $scroll AND $aScroll are both true, $scroll turns back to false so that it doesn't clashes.
/************************************
* End How to Customize!
************************************/

/************************************
* The Function!
************************************/
postsTopicsSnippet(
$mode = 1,
$boards_id = array(),
$cats_id = array(),
$stickyOnly = false,
$limit = 5,
$subjectLength = 25,
$bodylength = 100,
$parseSmileys = true,
$show_board = true,
$show_views = true,
$show_replies = true,
$show_category = true,
$show_author = true,
$show_newIcon = true,
$show_time = true,
$scroll = true,
$aScroll = false
);

//Thank you for using this Code snippet.
And you are done :).


Made by Dragooon(me).
Version 3.0
Posts/Topics Snippet


Change log
# Version 3.0 :
# Renamed it to "Posts/Topics Snippet" from "Custom Recent Posts/Topics, Board News"
# Renamed the file to "PostsTopicsSnippet.php" from "RTP_BN2.3.php"
# Renamed the function from recent_post23 to postsTopicsSnippet
# Changed a lot of coding
# Made this snippet faster
# Added ability to choose categories from which only the posts will show
# Added ability to weather show there various attributes or not, each indivisually
# Added a option(stickyOnly) which if selected will show posts only from Sticky Topics, because of this addition Mode 3 and 4 are replaced by 2 New modes
# A new 3rd Mode : Top Viewed
# A new 4th Mode : Top Replied

Rest changelog can be found in the file


Please Note: This snippet is tested and no errors are found but still there is a chance of bugs, if so please post the bug/error here.

All Comments, Questions, Suggestions etc can be posted here
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.
Post by: jacortina on October 14, 2007, 10:32:15 AM
Why did I used a External File?
#1 - Its easier to edit and customize

I can't say that pressing the 'Save' button on a block or article is that difficult (compared to saving and FTPing a file), but if you were going to go this route, you could just make the values arguments of the function (with defaults) and not have to bother with changing them in code.

Code: [Select]
function recent_post20($board = 0, $limit = 5, $bodylength = 128, $mode = 1)
This would also allow different blocks/articles to call it in different ways (one block for topics and another for sticky posts, for example).
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.
Post by: Dragooon on October 14, 2007, 10:34:24 AM
I thought of that way, But left it somehow.
Also If You read my 2nd reason, You'll get the true answer.
EDIT:
OK I might release a V 2.1 sooner or later, That will have what J.A. said
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 14, 2007, 11:25:18 AM
Updated, Hope it works out well :).
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: samo_zin123 on October 14, 2007, 11:49:44 PM

tell me how to customizethe whole length of the block i want to make the scroller disappear

Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 15, 2007, 03:46:44 AM
To Make the Scroller disappear Open up RTP_BN2.1.php find
Code: [Select]
     <div style="width: 100%; overflow: auto; height: 40ex;">';And change to
Code: [Select]
     <div style="width: 100%;">';Untested but should work.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 17, 2007, 07:43:26 AM
No one liked it?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Crip on October 17, 2007, 08:44:22 AM
Got a demo?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 17, 2007, 10:02:36 AM
I wasn't able to arrange one yet. It is quite same as TP's one (Layout wise).
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: jacortina on October 17, 2007, 02:07:31 PM
Couple of comments specifically on the query:

You call THAT query big and bad? ;)

I don't think you really need the criteria "AND b.memberGroups = b.memberGroups".

Also, you should allow for those who haven't enabled a recycle board:
Code: [Select]
AND b.ID_BOARD != $modSettings[recycle_board]Should probably be replaced by:
Code: [Select]
(!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '')
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 17, 2007, 09:51:01 PM
I never looked it that way.
Since it always worked :P. I'll improve it later.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: lebisol on October 18, 2007, 12:47:27 AM
Nice, Dragoon it fired right up.
Now we can have "Ultimate FAQs" compiled from stickies from all boards   ;)
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 05:44:40 AM
Thank you :).
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: samo_zin123 on October 18, 2007, 05:56:55 AM
 i got an idea fot the next version try to make it show athumbnil of pix present in the topics it will make the site kool  like yahoo

u know i saw that in that site too www.persiantools.eu
they call it article thumbs
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 07:50:39 AM
That'll be way to hard, actually impossible for me.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 08:22:24 AM
There are some known issues listed in the first post. Only happens if you are using this in more than 1 block. Fix is found, Keep looking for ver 2.1.1
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: alhaudhie on October 18, 2007, 08:31:52 AM
To Make the Scroller disappear Open up RTP_BN2.1.php find
Code: [Select]
     <div style="width: 100%; overflow: auto; height: 40ex;">';And change to
Code: [Select]
     <div style="width: 100%;">';Untested but should work.

how can i make it auto scroll up like shoutbox?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 08:37:14 AM
That'll require some JavaScript which I don't have knowledge of. I might do this lol.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: IchBin™ on October 18, 2007, 08:41:06 AM
It doesn't require javascript, just the marquee tag for HTML. Only javascript if you want to pause on mouseover or something.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: alhaudhie on October 18, 2007, 08:42:30 AM
how can i make that for this script?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 08:43:10 AM
It doesn't require javascript, just the marquee tag for HTML. Only javascript if you want to pause on mouseover or something.
Hmm, gotta look into the shoutbox.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: alhaudhie on October 18, 2007, 08:46:44 AM
when i put the 2 php blocks, 1 for recent post and another for latest topics its still show the latest topic for all blocks, i have setting up the mode to 1 and 2.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 08:48:18 AM
Did you see the notice? I am working on it. Keep seeing for 2.2. I know that issue.
I am working as hard as I can on it.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: IchBin™ on October 18, 2007, 08:55:21 AM
It doesn't require javascript, just the marquee tag for HTML. Only javascript if you want to pause on mouseover or something.
Hmm, gotta look into the shoutbox.
I wasn't saying the shoutbox didn't require javascript. I was saying to make your code use a scroller doesn't require it. :)

http://www.htmlcodetutorial.com/_MARQUEE.html
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 08:56:03 AM
I know. I just don't have a idea on how to do this. So I was thinking of looking in shoutbox on how does it does it.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: IchBin™ on October 18, 2007, 08:56:33 AM
edited my post above with a link for marquee. :)
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 09:01:29 AM
Thanks Ich, I will add it to version 2.2
EDIT:
But it is just for Left/Right scroll. What I am talking of here is Up/Down scroll.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: IchBin™ on October 18, 2007, 09:24:18 AM
Actually direction="up" is supported, it just doesn't show that on the page.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 09:25:40 AM
Gotta test this out.
Here is a briefing on version 2.2

# Version 2.2 :
# Fixed the Bug in which using this code in more than 1 block was causing a Lot of troubles.
# Improved the recycle Board identifying. Idea by J.A.Cortina (Tinyportal.net)
# Now enabled the use of Mode 3 and 4(The sticky topics one) for every board for more functionality. That means the board can be 0 and it will show from all boards. But if you want from 1 board, It is still available ;)
# Added option to choose scroll or not.
(Captured from changelog).
I may include the auto-scroller, If I am able to get it :P.

EDIT:
Ok I have included this(In a quite basic form) to in the next version.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: alhaudhie on October 18, 2007, 09:45:40 AM

I may include the auto-scroller, If I am able to get it :P.

EDIT:
Ok I have included this(In a quite basic form) to in the next version.

its still in progress or can be use now?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 09:47:41 AM
I haven't released it yet. Maybe in another 30 mins. I am just testing it out to ensure you don't encounter any errors.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: lebisol on October 18, 2007, 09:47:59 AM
here is marque snip:
Code: [Select]
<marquee width="100%" behavior= "scroll" align= "left" direction="left" scrollamount="3" scrolldelay="60" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'> HELLO WORLD</marquee>
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: alhaudhie on October 18, 2007, 09:49:23 AM
I haven't released it yet. Maybe in another 30 mins. I am just testing it out to ensure you don't encounter any errors.
i  will wait for this... tq
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 09:50:12 AM
here is marque snip:
Code: [Select]
<marquee width="100%" behavior= "scroll" align= "left" direction="left" scrollamount="3" scrolldelay="60" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'> HELLO WORLD</marquee>
Thanks! This helped me to add the On Mouse hover stop and On Mouse out start.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: lebisol on October 18, 2007, 09:51:39 AM
No problems...you guys post too fast v 2.2 is already out LOL.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.1 Out!]
Post by: Dragooon on October 18, 2007, 09:54:19 AM
Ehh Who told that lol???
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: Dragooon on October 18, 2007, 10:24:52 AM
Version 2.2 finally out!
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: alhaudhie on October 18, 2007, 10:48:39 AM
 ;)

Thanks... really working now...

another things...

can u make the scrolling so smooth.. i look its very fast... tq
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: Dragooon on October 18, 2007, 11:22:53 AM
I'll see :).
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: lebisol on October 18, 2007, 02:50:11 PM
adjust scrollamount="3" scrolldelay="60"
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: Dragooon on October 18, 2007, 09:29:51 PM
Lol I forgot about that. I'll look into adding some more features into next release.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: yameth on October 23, 2007, 08:05:54 AM
Is there a way to choose a number of boards?
Is it either 1 or all only? or am I doing something wrong?
It would be good to pick more than one board.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: Dragooon on October 23, 2007, 08:14:13 AM
I haven't tested it that way, I'll look into that.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: yameth on October 23, 2007, 08:22:44 AM
Thanks! Good work and very useful.
I want to use it to show latest posts from certain boards.
A good trick would also be if only the last updated post of a thread showed. That way same topics would not repeat in the block.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: Dragooon on October 23, 2007, 08:28:22 AM
Yes, I think I got it, Just require some tests and cleaning.
Keep checking, I may release 2.3 soon.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: texasflats on October 25, 2007, 06:31:35 AM
This is great. I'm also trying to "choose" which boards show, looking forward to the next release. Thanks!
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.2 out!]
Post by: Dragooon on October 25, 2007, 08:57:33 AM
Version 2.3 out!
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: biggsy on October 26, 2007, 07:58:59 AM
i dont see how to use it for news? any ideas?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on October 26, 2007, 09:22:56 AM
It can be used as grabbing posts from A News and Announcements board.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: biggsy on October 26, 2007, 09:26:37 AM
ah ok thx, i thought it meant grabbing from news section.

thx for clearing that up
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: alhaudhie on October 27, 2007, 11:30:05 AM
when the posting have an image i have new problem with IE

The whole block is moving straightly according to the image width.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: alhaudhie on October 27, 2007, 11:59:40 AM
i suggest anybody can test with their site using the posting with the image.. and look it wether there is problem or not. Use IE
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: morskisrle on October 29, 2007, 12:56:17 PM
Hey is there a possibility to add an option to this code to specify only topic numbers of your choise
Something like an mode:
#5 = show topics of your choise from the whole forum (without reply views)

This will then show only topics i choose and not recent ones and not only within a ceratin boarssd but the whole forum. For exapmle topic (2, 6, 56, 45, 7546, ... and you can add topics witch the time)

The rest of the code and layout just stays the.


Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on October 30, 2007, 02:39:26 AM
It is, But with some major Query changes.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: rockyrails on October 31, 2007, 07:19:07 AM
Hi
Donloaded the file and put it in sources directory - created php block with code inserted and I get this error :

Parse error: syntax error, unexpected T_STRING in /home/......./public_html/........./Sources/RTP_BN2.3.php on line 1

Any help would be great - thx
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on October 31, 2007, 07:51:49 AM
Re-Upload everything. That should definitely not happen.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: rockyrails on October 31, 2007, 08:20:16 AM
I did that - re-uploaded the file and re pasted the code into a php block (center block)
and got the same error. I did not make any changes to the code or php file both were used as is.
thx.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on October 31, 2007, 08:41:11 AM
Any other blocks you are using?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: rockyrails on October 31, 2007, 09:05:34 AM
Hi - yep around 30 odd other blocks. I will try it out later today on my test site where I can isolate just the one block then I will be able to see if it and which is a conflict - thanks
cheers
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on October 31, 2007, 09:21:41 AM
OK, Try this on a Test site, if it works there, then it might be other block Conflicting with this.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: rockyrails on October 31, 2007, 01:29:27 PM
Am I missing something - installed it on my test site - no other blocks running in front page block php.. added the script with nothing modified and I get the same error:

Parse error: syntax error, unexpected T_STRING in /........./public_html/testsite/Sources/RTP_BN2.3.php on line 1

These are on 2 different servers.  could there be a confilct with smf mods applied other than TP blocks. Here are the packages installed :

Mod Name   Version   
1.   TinyPortal   0.983   [ Uninstall ]
2.   FelBlog for SMF   0.941   [ Uninstall ]
3.   SMF Staff Page   1.5.1   [ Uninstall ]
4.   SMF 1.1.4 Search "brd" Bug Fix   1.0   [ Uninstall ]
5.   Signature BBCode Bar   1.4   [ Uninstall ]
6.   Contact Page   1.1   [ Uninstall ]
7.   Global Headers Footers   1.3   [ Uninstall ]
8.   VisualWarning   1.41   [ Uninstall ]
9.   Auto Embed Video Clips   1.0   [ Uninstall ]
10.   Change Theme Permission   1.0   [ Uninstall ]
11.   Global Announcements   1.0   [ Uninstall ]
12.   Internal Links Use Same Window   1.1   [ Uninstall ]
13.   Simple Award System   1.3.0   [ Uninstall ]
14.   Users Online Today Mod   1.4.0   [ Uninstall ]
15.   User Email System   1.2   [ Uninstall ]
16.   TP Downloads Download item permission   1.0   [ Uninstall ]
17.   SSI Membergroup   1.0   [ Uninstall ]
18.   ssi_grabMessage   1.0   [ Uninstall ]
19.   SMF Ranks   1.1   [ Uninstall ]
20.   Country Flags   1.0.1   [ Uninstall ]
21.   SMF Poll Mod   1.01   [ Uninstall ]
22.   Updated Registration Agreement   1.0   [ Uninstall ]
23.   RSS Feed Icon   1.1   [ Uninstall ]
24.   SMF Archive   1.1   [ Uninstall ]
25.   AvatarSelect   1.1.2   [ Uninstall ]
26.   Reg Bar   1.0   [ Uninstall ]
27.   Load Standard Language   1.0.1   [ Uninstall ]
28.   FontandSizeDropdown_1.2   1.2

cheers
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on November 01, 2007, 06:56:33 AM
This Is something I can't predict without looking into it.
That should not happen if you have copied the whole code correctly.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Pigenela on December 06, 2007, 02:13:19 AM
Hey all,

Dragooon, my question to you.

When I use 2 blocks to show posts from specified boards [actually 1 block gets posts from 1 board and the other one from 3 different] page creation time increases up tp 70 sec 0_o.

Could you pls check what could be a reason?

Tnx in advance.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 06, 2007, 02:48:21 AM
This should not happen, For me its not more than 2 secs on my crappy machine.(128 MB Ram :P)
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: falguni1 on December 06, 2007, 04:07:27 AM
very good
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 06, 2007, 04:08:05 AM
Glad you liked it :)
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Lysyj on December 06, 2007, 08:35:18 PM
sorry,but if i have some music online in a 3 topics?
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 06, 2007, 08:52:17 PM
Hmm Not Sure. It'll only affect if you have some body showing.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: man1aak on December 07, 2007, 03:42:53 AM
Hey all,

Dragooon, my question to you.

When I use 2 blocks to show posts from specified boards [actually 1 block gets posts from 1 board and the other one from 3 different] page creation time increases up tp 70 sec 0_o.

Could you pls check what could be a reason?

Tnx in advance.
well it does
it works perfectly on my test forum with 4 users and 10 topics.
but it works so damn slow on my main site, with
Total Members: 3691
Total Posts: 104513
Total Topics: 3052
Total Categories: 4
Users Online: 80
Most Online: 250 - 25 November 2007, 23:24:38
Online Today: 114
Total page views: 3048020
  Average registrations per day: 19.01
Average posts per day: 701.6
Average topics per day: 20.97
Total Boards: 23
Latest Member: wood
Average online per day: 96.63
Male to Female Ratio: 29.3:1
Average page views per day: 31102.24
 
link to status: www.prodota.ru/status.php
im using VDS with 800mhz cpu and 458mb ram

PS actually he uses to get not posts, but topics, and topic creator's name
PPS thx for this block
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 07, 2007, 03:58:35 AM
If you remove the blocks is it faster then?
On my both test forum(With 10,000 posts and 900 members) and main forum(With 23000 posts and 9000 members) It is fine.Just adds a little bit of query.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: man1aak on December 07, 2007, 06:52:47 PM
ye, if im removing blocks it's fine. if im leaving main page and go to forum(when ur reading forums blocks are hidden) it is almost fine too.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 07, 2007, 10:38:10 PM
In Version 3.0 I'll try to optimize this
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 08, 2007, 10:40:25 PM
OK Just thought I'd let you guys Know, I think I was able to fasten up the things. ON my live site it was adding 0.5 secs load, I was able to get it down till 0.05-0.1, which seems to be much faster, IF I didn't screwed stuff :P(Hopefully I didn't :)).

So Version 3.0 will *hopefully* be faster
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: aerojad on December 08, 2007, 11:32:13 PM
sweet block you have here, just have a couple questions:

How can I extend the lengths of the title? (I'm using it as a center block, so I have the space)
What would I need to edit to edit the way the output looks? (I sort of want to use this as a replacement to the article system, so it pulls topics from the board, just need a way to make it look nice like the article system)
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 08, 2007, 11:39:30 PM
Edit the File you put into Source directory ;).
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: rdoggsv on December 21, 2007, 09:31:15 AM
Maybe for the next version you can include a "today's hot topics" or something like that,

Thank you nice block.
Title: Re: Highly Customizable Recent Posts/Topics, Board News Block.[Version 2.3 out!]
Post by: Dragooon on December 21, 2007, 09:45:48 AM
This is Recent, Not Hot Topic :P
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on January 02, 2008, 11:32:24 PM
Version 3.0 out!
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 09, 2008, 05:54:17 PM
How can I change the font size of the subject of the topic?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 09, 2008, 09:33:39 PM
Edit the File, Under the loop there's a option.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 09, 2008, 11:16:11 PM
Under the "Loop"??? What is that? What file to edit?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 12, 2008, 12:27:50 AM
Bump!! ^^^^^^^^^
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 12, 2008, 12:41:30 AM
Meh My bad :P, I forgot to check this post
In PostsTopicsSnippet.php find :
Code: [Select]
echo $i['message']['link'];And try replacing it with
Code: [Select]
echo '<div style="font-size:13px;">',$i['message']['link'],'</div>';This is untested, but I think it should work.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 12, 2008, 09:21:23 PM
Ok Thanks a lot! It works fine. I need to accomplish one more thing.

Here, take a look at my site - http://eCric.net

I have two blocks using your code. I'm using them for articles. One block shows the latest article and the other block shows last 5 articles.

I only want to change the font size of the "title of the latest article". So do we need to create duplicate PostsTopicsSnippet.php files to accomplish it? Please help. I hope I have explained it good, if not, ask me more question.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 12, 2008, 11:16:39 PM
Actually yeah, you have to duplicate it.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 12, 2008, 11:38:55 PM
Can you tell me what edits should I make?

Cuz I duplicated the file to PostsTopicsSnippet1.php and I got this


Fatal error: Cannot redeclare poststopicssnippet() (previously declared in /home/ecricnet/public_html/smftest/Sources/PostsTopicsSnippet.php:47) in /home/ecricnet/public_html/smftest/Sources/PostsTopicsSnippet1.php on line 294

Check it out on http://ecric.net/smftest/

I changed the block to relate to PostsTopicsSnippet1.php
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 13, 2008, 12:56:22 AM
Try this, open the file and find
Code: [Select]
function poststopicssnippetand rename it to
Code: [Select]
function poststopicssnippet1Then in the block code where it says poststopicssnippet, rename it to poststopicssnippet1
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 13, 2008, 01:25:14 AM
Worked perfectly. Thanks a lot. You are the best.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 13, 2008, 07:14:27 PM
Ok one last thing....How can I make the title of the topic bold?

Edit: Got it. Thanks. Great Snippet. :D
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on February 18, 2008, 10:13:33 PM
Can I get this snippet to show related threads or is there any snipped that does that?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 19, 2008, 01:20:51 AM
I don't know any snippet to show related thread.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: RSprinkel on February 19, 2008, 05:32:52 AM
Dragooon,

Awesome little piece of code here.  I am wondering if there is any way to shrink the actual block down some?  I tried editing the Number of characters for each of the Subject line and body length and that doesn't seem to work.

Any help on this would be greatly appreciated.

Thanks much in advance for the help and this snippet.

Ron S.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: RSprinkel on February 19, 2008, 05:45:22 AM
Never mind figured it out thanks anyways. ;)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: slackerpunk on February 20, 2008, 10:52:22 PM
is it fixed width? reason I asked is because I want to use this on a center block
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 20, 2008, 10:55:20 PM
Yes, But you can edit the file to change that.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: monotiz on February 23, 2008, 05:51:33 AM
Hi, I try to test the snippet but obtain:

Code: [Select]
Fatal error: Call to undefined function postsTopicsSnippet() in /home/hosting/drz-italia.com/smf/Sources/Load.php(1747) : eval()'d code(35) : eval()'d code on line 1
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on February 23, 2008, 05:52:47 AM
Did you uploaded the file?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: monotiz on February 23, 2008, 07:45:06 AM
Did you uploaded the file?
Problem solved. I have done wrong to copy/paste.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: alving on March 09, 2008, 01:45:00 AM
Meh My bad :P, I forgot to check this post
In PostsTopicsSnippet.php find :
Code: [Select]
echo $i['message']['link'];And try replacing it with
Code: [Select]
echo '<div style="font-size:13px;">',$i['message']['link'],'</div>';This is untested, but I think it should work.

Hi Dragoon,

very nice piece of code.  just what i needed.  a question though regarding the font size, is there a way that the font size will be the same as that of the other contents in my webpage?  it seems quite small.  the other pieces of codes that i used in my webpage, has the same font size though coming from different authors. 
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: alving on March 09, 2008, 03:11:03 AM
Ok one last thing....How can I make the title of the topic bold?

Edit: Got it. Thanks. Great Snippet. :D
hi panesarv,

how did you make the title of the topic bold?  thanks in advance
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: fords8 on March 10, 2008, 01:31:23 AM
Sorry if someone posted this already. But I didn't see it.

I want to use this for 3 blocks. All of them using mode 1 (Recent Topics). Is it possible or not?

I will play with it tomorrow if I have time. I just wanted to ask to see if anyone has tryed it or not.

Thanks!
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on March 10, 2008, 01:43:18 AM
Yes it is.
You can insert the block code in the blocks and it will use the same file and should run fine.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: fords8 on March 10, 2008, 08:48:47 AM
Yes! 3 blocks work and they work great. I may add 2 more blocks down the road.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: alving on March 12, 2008, 03:07:49 AM
Ok one last thing....How can I make the title of the topic bold?

Edit: Got it. Thanks. Great Snippet. :D
hi panesarv,

how did you make the title of the topic bold?  thanks in advance

can you help me, dragoon.. how do i make the title topic bold?

thanks in advance
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: kripz on March 20, 2008, 03:03:35 AM
BBCodes is breaking this.

eg. I set body character limit to 10.

My post contains

Quote
URL:Link (http://http://www.link.com)

Code: [Select]
URL:[url=http://http://www.link.com]Link[/url]
It appears as

URL:[url=h

Disastrous effects if i set limit to something like 50 and a url isnt fully parsed, the link stretches out of the box.

Suggestion:

Instead of having an array of boards to include, have the option to have an array of boards not to invluce. eg. !array(2,3), posts wont be pulled from boards 2 and 3 but every other board will be used.

Have an option to not include stickies.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: FERNSIDEâ„¢ on April 12, 2008, 06:11:55 PM
Hi mate.
I'll start by saying that this block is great!!    And thank you for sharing it :)

I have found, that it somehow stops me from disabling the blocks below it.

Example.
Say I have 7 blocks in the left panel.
This block is the third.
If I click on the  +,-  buttons that show and hide the panel, each block below the 3rd are still visible.
If I disable this block, then they will all hide.

Any ideas buddy?
You can read more into it, in [THIS] (http://www.tinyportal.net/index.php?topic=23301.msg188694#msg188694) thread.

Thank You :)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on April 12, 2008, 09:51:47 PM
Does the same happens if you disable this block?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: FERNSIDEâ„¢ on April 12, 2008, 10:23:55 PM
Hi mate.  :)

As you know, my problem in the other thread has been sorted.
I am still having this issue with this block though.
Would you mind coming to my site, and looking at it yourself?

I can PM you an accounts details, incase you do have the time.

Thank You :)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on April 12, 2008, 10:36:17 PM
OK Go ahead.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: FERNSIDEâ„¢ on April 12, 2008, 10:49:05 PM
Thanks mate. :)

Pm sent.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: FERNSIDEâ„¢ on April 13, 2008, 02:55:40 PM
Has anyone implemented an alternative scroll function to this code?
Dragooon and I havent been successful to this point.

Thank You in advance. :)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: alex777 on April 20, 2008, 07:04:18 AM
How can I get the title bold?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: warhonowicz on April 21, 2008, 04:29:42 AM
Great block.

One little thing that would (for me) make it even better. I use it in mode 2 and a filter would be fantastic, so each topic would show up only once
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: sorosh on May 24, 2008, 08:48:19 AM
How can i center it in the block must i add center tags and where?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on May 24, 2008, 08:50:08 AM
In PostsTopicsSnippet.php
Find
Code: [Select]
<div style="width: 100%;',$scroll ? 'overflow: auto; height: 40ex;' : '','" class="smalltext">And replace it with
Code: [Select]
<div style="width: 100%;',$scroll ? 'overflow: auto; height: 40ex;' : '','" class="smalltext" align="center">
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: sorosh on May 24, 2008, 09:05:21 AM
thanks but i get then this in my block:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/.../public_html/forum/Sources/PostsTopicsSnippet.php on line 261
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on May 24, 2008, 09:09:10 AM
Can you post the code around it?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: sorosh on May 24, 2008, 09:13:46 AM
I post it ;)in attach...
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on May 24, 2008, 09:16:59 AM
You removed the '; after the line
This line
Code: [Select]
echo '
<div style="width: 100%;',$scroll ? 'overflow: auto; height: 40ex;' : '','" class="smalltext" align="center">
Should be
Code: [Select]
echo '
<div style="width: 100%;',$scroll ? 'overflow: auto; height: 40ex;' : '','" class="smalltext" align="center">';
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: sorosh on May 24, 2008, 09:21:37 AM
Thank you very much for your help Dragooon! It works!! And sorry for not reading your signature;)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: FlynT on May 27, 2008, 07:52:04 AM
First of all, i love this Block!!!

But i got a little Question.
I have searched a long Time for a way to Show the Topic Starter instead of the Last Poster, but i also want to show the Last Poster. Is there a way to make it possible in your Block?

Here is a Screen of what i know...

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg256.imageshack.us%2Fimg256%2F3043%2Flatestpm1.gif&hash=0cf5d12ea1abbbebe6464222b867f10e)

I translate the German Part for you ;)

begonnen von = started by
Letzte Antwort = Last Reply

Hope you know what i mean  :buck2:
Thanks in advanced and keep up the Good work ;)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: kripz on May 30, 2008, 02:53:10 AM
I have a suggestion. Can you exclude Moved topics?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: panesarv on June 01, 2008, 01:43:53 AM
Ok one last thing....How can I make the title of the topic bold?

Edit: Got it. Thanks. Great Snippet. :D
hi panesarv,

how did you make the title of the topic bold?  thanks in advance

Sorry, didn't check this topic. You should have PM'ed me.

This below code will work for sure but it will change the font size. You can play around with the font size or you can try option 2.

Find:
Code: [Select]
echo $i['message']['link'];
Replace:
Code: [Select]
echo '<div style="font-size:13px;">',$i['message']['link'],'</div>';
Option 2:

Find:
Code: [Select]
echo $i['message']['link'];
Replace:
Code: [Select]
echo '<b>>',$i['message']['link'],'</div></b>';
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: jepot on July 01, 2008, 11:16:24 PM
cant you change the colour of scrollbars when using firefox? - is that true
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on July 02, 2008, 02:24:53 AM
I think only IE supports that.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: witchking on July 09, 2008, 03:20:59 AM
Hi and many congratulations for this great script. I have a little small problem or suggestion.Its depends of modes.
When I am using mode 1 (topics recent), the topics in my bloc appears ordering by the creation day of the topic and not ordering by the last post day within topics. So , if someone makes a post in a topic , nothing its  happens in bloc list of topics. Only if someone make a new topic , this topic is going first.

When I am using mode 2 (post recent), appears one by one all the posts that have been submitted ordering by time/day, even if these are in the same topic.

It is possible with some way/mode to appears the topics list in bloc , not ordering  by the creation day of them , but ordering by the last post time/day in the topics of the specific board , just like they appears in forum boards.

Thank you

P.s I am using V3


Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Lum-chan on July 10, 2008, 06:38:47 AM
Just installed verson 3.00 for SMF 1.1.5 with TP 1.05 Beta1 and it works great when using Firefox 2.0.0.14/Firefox 3.0. However, with Internet Explorer 6.0.2900.5512.xpsp.080413-2111 the block is just that high to show 1 post scrolling. Scrolling is set to auto.
This is de code I added in the PHP box:
Code: [Select]
// Posts/Topics Snippet
// By Dragooon
// www.gforumx.com
// Version 3.0

//The instructions are posted in the thread of this snippet + they are quite here.

// Lets call the file
global $sourcedir;
require_once($sourcedir . '/PostsTopicsSnippet.php');

// Declare it. There is NO need to edit this part
$boards_id = array();
$cats_id = array();
/************************************
* How To Customize!
************************************/
# This is how to customize the block. To customize this please edit the variable given in the Below function call (postsTopicsSnippet). Do Not edit the variables given in this How To. This How to explains, what is the variable is and what does it do.
# How to Customize is given below.
# Make sure not to remove ANY comma
# Make sure not to remove "array()" part in the $boards_id and $cats_id variables.

# $mode : Mode of the Block
# 1 = Recent Topics
# 2 = Recent Posts
# 3 = Top Viewed
# 4 = Top Replied

# $boards_id : ID Of Boards to show the posts/topics from
# Do Not remove array() part, Insert the ID(s) of boards you want posts to show from.
# Use comma ( , ) as a separator
# Example : $boards_id = array(1, 2, 3)
# Leave empty to grab posts from all boards

# $cats_id : ID Of categories to show the posts/topics from
# Do Not remove array() part, Insert the ID(s) of categories you want posts to show from.
# Use comma ( , ) as a separator
# Example : $cats_id = array(1, 2, 3)
# Leave empty to grab posts from all categories

# $stickyOnly : Weather to get the topics which are sticky only or not
# true : yes
# false : no

# $limit : Maximum no. of topics/posts to show

# $subjectLength : Max characters the subject can have.

# $bodylength : Max characters the subject can have
# Setting it to 0 will result showing of no body.

# Below are some configuration variables
# For these, if set to true, it means Yes.
# If set to false, it means no.

# $parseSmileys : Weather to parse smileys or not

# $show_board : Weather to show the board the topic/post is posted in or not

# $show_views : Weather to show the no. of views or not

# $show_replies : Weather to show the no. of replies or not

# $show_category : Weather to show category or not

# $show_author : Weather to show the author who posted this or not

# $show_newIcon : If the post is unread, weather to show the New Icon or not

# $show_time : Weather to show the time the post/topic is posted on or not

# $scroll : If the height it longer than 40 pixels, weather to make it as a scroll or not

# $aScroll : Weather to make it auto scroll or not
# NOTE : If $scroll AND $aScroll are both true, $scroll turns back to false so that it doesn't clashes.
/************************************
* End How to Customize!
************************************/

/************************************
* The Function!
************************************/
postsTopicsSnippet(
$mode = 2,
$boards_id = array(),
$cats_id = array(),
$stickyOnly = false,
$limit = 15,
$subjectLength = 25,
$bodylength = 0,
$parseSmileys = false,
$show_board = false,
$show_views = false,
$show_replies = false,
$show_category = false,
$show_author = true,
$show_newIcon = false,
$show_time = true,
$scroll = false,
$aScroll = true
);

//Thank you for using this Code snippet.

What is going wrong or should my current version of IE be upgraded. Tested this on several machines with the same IE version. All show the same problem even with the default Theme of SMF 1.1.5

My website -> http://forum.lum-chan.com/

What to do now?

[edit]
Upgraded to Internet Explorer 7 but it still doesn't show the same way as in Firefox. Other blocks in TP show up correctly.
Tried to move it across the left-block but  this makes no difference sofar...
[/edit]
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: fangweile on July 13, 2008, 09:14:48 PM
Hello there, I have a topic rating mod installed in my forum and would it be possible to include the rating of each topic.

Any idea?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: IchBin™ on July 13, 2008, 11:50:10 PM
You should ask the author of that mod how it can be included in this block.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: jepot on July 17, 2008, 07:58:23 AM
nice work
but how do i enlarge the font for the title?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: andy9602 on July 27, 2008, 09:14:19 PM
Thanks for the great script.
But I have a little problem with it.
It looks perfect in FF but in IE is my block with this script (no matter if left, right or center block) just to strait.
In FF is the block circa 12cm height and in IE a little bit more than 1cm.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: efil on July 28, 2008, 02:02:38 AM
Great!!!

Exactly what i was looking for.

Thanks,
Efil.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Lafemme on August 16, 2008, 08:21:22 AM
Hi and many congratulations for this great script. I have a little small problem or suggestion.Its depends of modes.
When I am using mode 1 (topics recent), the topics in my bloc appears ordering by the creation day of the topic and not ordering by the last post day within topics. So , if someone makes a post in a topic , nothing its  happens in bloc list of topics. Only if someone make a new topic , this topic is going first.

When I am using mode 2 (post recent), appears one by one all the posts that have been submitted ordering by time/day, even if these are in the same topic.

It is possible with some way/mode to appears the topics list in bloc , not ordering  by the creation day of them , but ordering by the last post time/day in the topics of the specific board , just like they appears in forum boards.

Thank you

P.s I am using V3


I have the same question... can this be altered? I want to show the topics.. but not only the new reacted topic.. but also show the replys.. only.. if possible.. not double.. as it would in mode 2.


up :)  http://www.tinyportal.net/index.php?topic=19339.msg195498#msg195498
nice work
but how do i enlarge the font for the title?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Final60 on August 25, 2008, 08:02:53 PM
Hello
Sorry if this has already been ask, but how can I make the block longer so it shows all the posts/topics without need of the scroll bar?

Thanks in advance
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: Dragooon on August 26, 2008, 03:16:12 AM
Make sure $scroll is false.
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: alhaudhie on September 06, 2008, 06:06:15 PM
i using this snippet...

I chose to use mode 1.
But how can i make to go to the last msg in that topic?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: jiggamouse on September 12, 2008, 11:08:07 AM
Your snippet has just saved my life. This is exactly what I've spent the last 24 hours looking for!
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: jiggamouse on September 12, 2008, 11:13:11 AM
@alhaudhie: you should use mode 2 and not mode 1 and it will show the last message.

@final60: set scroll to false (leave aScroll as false too)
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: alhaudhie on October 06, 2008, 08:26:52 AM
what must  do if i want to show topic in a bold text?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: camci02 on December 13, 2008, 10:05:04 AM
is this working on smf 2.0 ?
Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: JPDeni on December 13, 2008, 10:29:17 AM
Since TP is not available for SMF 2.0 yet, none of the block snippets for TP will work on SMF 2.0.

Title: Re: Multi-Functional Posts and Topics Snippet [Version 3.0 out!]
Post by: FragaCampos on April 11, 2009, 07:23:46 AM
Hello, thank you for the snippet :)

I would like to know how can i exclude (if possible) the sticky and pinned topics from the list.