Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tyty1234

Pages: [1] 2
1
Mod Support / Tytyweb Package Server
« on: June 24, 2011, 08:45:23 PM »
I have setup a package server for my mods for you guys to download my mods straight from my site. If you don't know how to add a package server to your website, read below on how.

Package Server URL: http://www.tytyweb.net/smf/mods/

How to add a new package server
1. Go to your Package Manager.


2. Then click on Download Packages.


3 .Enter the details as seen here under "Add New Server" and then click on "Add Server".


4. The Tytyweb package server should now show up under the list of servers.


5. And now you're able to download my mods from my site straight from your SMF forum!

2
Mod Support / Re: SSI Topics and Replies
« on: June 23, 2011, 10:28:19 PM »
Function Reference

Description
This function grabs all posts associated with $topic, and returns an array of the first post (topic) and its replies. This function has the ability to grab attachments associated with the posts that it returns when $get_attachments is set to true. The function limits itself to the first $num_replies of replies unless you choose to get the last # of replies to $topic (read about the $start parameter below). When called, the function will display the topic and the first 10 replies by default.

Full Usage
Code: [Select]
<?php ssi_topic(int $topicint $num_repliesint $startstring $more_replies_txtbool $override_permsbool $get_attachmentsstring $output_method); ?>
Parameters
$topic (integer) (required)
Insert the topic ID you would like the function to grab. Usually this can be found with the ?topic request in the url when viewing a topic. If you're using Pretty URLs, the topic ID can be found by clicking the permalink to the first post, and it will give you a msg# in the url.

$num_replies (integer) (optional)
The number of replies you want the function to grab. If there are more replies in the topic than the number you define here, it will add a "more replies" link to array that you can customize with $more_replies_txt.

$start (integer) (optional)
By default, this will grab all replies when $start is zero. The integer "1" will grab all the replies, starting from the SECOND reply. The integer "2" will grab all replies starting from the THIRD. The integer "3" ... FOURTH ... "4" ... FIFTH ... etc. You can define a negative offset to grab the last # of replies. For example, "-1" will grab the last reply, "-2" will grab the last 2 replies, and so on. If a negative offset is used however, $num_replies will be ignored.

$more_replies_txt (string) (optional)
By default, this is "More Replies". You can set this to whatever you want and when there are more replies than the amount defined in $num_replies, it will display link to the next comment, and it will display what you define for this variable, or if you don't put anything, it will display "More Replies".

$override_perms (boolean) (optional)
By default, this is false. When false, the function will grab the topic and replies only if the user can see the board the topic is in. For example, if you have a board private to specific users, and you're grabbing a topic from that board, the users that aren't specified will NOT be able to see the topic you grab. If this is true however, then those users that cannot see the board the topic is located in, WILL be able to see the topic and its replies. If you are okay with that, you may set this variable to true.

$get_attachments (boolean) (optional)
By default, this is false. If you wish to load the attachments that are attached to the topic and replies, set this to true. This will add an "attachments" key to the post array. If no attachments are found, then the array key will not be created. For information on what this array returns, see "Output Information" below.

$output_method (string) (optional)
By default, this is "echo", which will display your topic and replies using a simple blank template. To use your own template, you will have to design the template yourself, and set this to "array" or "return". For information on what this function returns as an array, see "Output Information" below.

Examples

To get only the first post of the topic...
Code: [Select]
<?php
// Get SSI.
require('SSI.php');

// Grab topic id 7, with no more than 10 replies, start from first reply,
// use default "more replies" text, use default perms, don't include attachments,
// and return an array, do not echo.
$topic ssi_topic(7100nullfalsefalse'array');

echo 
'
<table border="0">
<tr>
<td valign="top" nowrap="nowrap">
'
$topic['first_post']['link'], '
<div style="font-size: small">'
$topic['first_post']['time'], ' '$txt['by'], ' '$topic['first_post']['poster']['link'] , '</div>
<div style="padding: 2ex 0;">
'
$topic['first_post']['body'], '
</div>
</td>
</tr>
</table>'
;
?>


To get the replies to a topic and customize "more replies" link...
Code: [Select]
<?php
// Get SSI.
require('SSI.php');

// Grab topic id 7, with no more than 5 replies, start from first reply,
// say "More Comments" for "more replies", use default perms, don't include attachments,
// and return an array, do not echo.
$topic ssi_topic(750'More Comments'falsefalse'array');

echo 
'
<table border="0">
<tr>
<td valign="top" nowrap="nowrap">
<strong>Replies to '
$topic['first_post']['subject'], '</strong>
</td>
</tr>'
;

// Go through each reply, and display it.
foreach ($topic['replies'] as $reply)
echo '
<tr>
<td valign="top" nowrap="nowrap">
<div style="font-size: small">'
$txt['posted_by'], ' '$reply['poster']['link'] , ' '$txt['on'], ' '$reply['time'], '</div>
<div style="padding: 2ex 0;">
'
$reply['body'], '
</div>
</td>
</tr>'
;

// If there were more than $num_replies posts, then show the "more reples" link.
if (isset($topic['more_replies_link']))
echo '
<tr>
<td valign="top" nowrap="nowrap">
'
$topic['more_replies_link'], '
</td>
</tr>'
;

echo 
'
</table>'
;
?>


To get the attachments of the first post to a topic...
Code: [Select]
<?php
// Get SSI.
require('SSI.php');

// Grab topic id 7, with no more than 10 replies, start from first reply,
// use default "more replies" text, use default perms, include attachments,
// and return an array, do not echo.
$topic ssi_topic(7100nullfalsetrue'array');

echo 
'
<table border="0">
<tr>
<td valign="top" nowrap="nowrap">
'
$topic['first_post']['link'], '
<div style="font-size: small">'
$topic['first_post']['time'], ' '$txt['by'], ' '$topic['first_post']['poster']['link'] , '</div>
<div style="padding: 2ex 0;">
'
$topic['first_post']['body'], '
</div>'
;

// If there are attachments, list them.
if (isset($topic['first_post']['attachments']))
{
echo '
<div>Attachments:'
;

foreach ($topic['first_post']['attachments'] as $attachment)
echo ' <a href="'$attachment['href'], '">'$attachment['filename'], '</a>';

echo '</div>';
}

echo 
'
</td>
</tr>
</table>'
;
?>


To get the last 5 replies made to the topic...
Reminder: $num_replies will be IGNORED
Code: [Select]
<?php
// Get SSI.
require('SSI.php');

// Grab topic id 7, get last 5 replies, use default perms, 
// don't include attachments, and return an array, do not echo.
// $num_replies (10) is ignored.
$topic ssi_topic(710, -5nullfalsefalse'array');

echo 
'
<table border="0">
<tr>
<td valign="top" nowrap="nowrap">
<strong>Last 5 Replies to '
$topic['first_post']['subject'], '</strong>
</td>
</tr>'
;

// Go through each reply, and display it.
foreach ($topic['replies'] as $reply)
echo '
<tr>
<td valign="top" nowrap="nowrap">
<div style="font-size: small">'
$txt['posted_by'], ' '$reply['poster']['link'] , ' '$txt['on'], ' '$reply['time'], '</div>
<div style="padding: 2ex 0;">
'
$reply['body'], '
</div>
</td>
</tr>'
;

echo 
'
</td>
</tr>
</table>'
;
?>


Output Information
$topic_data holds all the information for the topic and replies. If $output_method is not "echo", the function will return an array of arrays. Below is more information on each array key.
$topic_data['first_post']['id']
Returns the ID of the post/reply.
$topic_data['first_post']['board']['id']
Returns the board ID of the board the post is in.
$topic_data['first_post']['board']['name']
Returns the name of the board the post is in.
$topic_data['first_post']['board']['href']
Returns the url only of the board the post is in.
$topic_data['first_post']['board']['link']
Displays the clickable link to the board the post is in.
$topic_data['first_post']['topic']
Returns the topic ID the post belongs to.
$topic_data['first_post']['poster']['id']
Returns the ID of the poster of the post/reply.
$topic_data['first_post']['poster']['name']
Returns the user name of the poster of the post/reply.
$topic_data['first_post']['poster']['href']
Returns the url only of the poster of the post/reply.
$topic_data['first_post']['poster']['link']
Displays the clickable link of the poster of the post/reply.
$topic_data['first_post']['subject']
Returns the subject of the post.
$topic_data['first_post']['short_subject']
Returns the short version of the subject of the post.
$topic_data['first_post']['preview']
Returns the preview of the post.
$topic_data['first_post']['body']
Displays the full content of the post.
$topic_data['first_post']['time']
Returns the date and time when the post was posted.
$topic_data['first_post']['timestamp']
Returns the UNIX timestamp of when the post was posted.
$topic_data['first_post']['href']
Returns the url only of the post.
$topic_data['first_post']['link']
Displays the clickable link to the post.
$topic_data['first_post']['new']
This determines if the post has been read or not. If 0 is returned, it is false or empty. If 1 is returned, it is true.
$topic_data['first_post']['is_new']
This determines if the post is new or not. If 0 is returned, it is false or empty. If 1 is returned, it is true.
$topic_data['first_post']['new_from']
This determines if the post is new from a post ID. If 0 is returned, it is false or empty. If 1 is returned, it is true.
$topic_data['first_post']['attachments'][$attach_id]['filename'] ($get_attachments must be true)
Returns the name of the file that was attached.
$topic_data['first_post']['attachments'][$attach_id]['filesize'] ($get_attachments must be true)
Returns the size of the file that was attached.
$topic_data['first_post']['attachments'][$attach_id]['downloads'] ($get_attachments must be true)
Returns the number of downloads the file attached had.
$topic_data['first_post']['attachments'][$attach_id]['href'] ($get_attachments must be true)
Returns the url only of the attachment.
$topic_data['first_post']['attachments'][$attach_id]['link'] ($get_attachments must be true)
Displays the clickable link of the attachment.
$topic_data['first_post']['attachments'][$attach_id]['is_image'] ($get_attachments must be true)
Returns if the attachment is an image or not. If 0 is returned, it is false or empty. If 1 is returned, it is true.
$topic_data['first_post']['attachments'][$attach_id]['image']['id'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Returns the ID of the image attached.
$topic_data['first_post']['attachments'][$attach_id]['image']['width'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Returns the width of the attached image.
$topic_data['first_post']['attachments'][$attach_id]['image']['height'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Returns the height of the attached image.
$topic_data['first_post']['attachments'][$attach_id]['image']['img'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Displays the image only.
$topic_data['first_post']['attachments'][$attach_id]['image']['thumb'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Displays a thumbnail of the image.
$topic_data['first_post']['attachments'][$attach_id]['image']['href'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Returns the url only of the image.
$topic_data['first_post']['attachments'][$attach_id]['image']['link'] ($topic_data['first_post']['attachments'][$attach_id]['is_image'] must be 1)
Displays the link to the image, and embeds the image, making it clickable.
$topic_data['replies']
This array returns an array of what $topic_data['first_post'] would return.
$topic_data['more_replies_link'] (Only created when the total number of replies in a post exceeds $num_replies)
Returns the clickable link to the next reply in the topic.

3
Mod Support / Mod updates for your forum
« on: June 23, 2011, 02:23:09 PM »
I created a utility for the mods that I have that checks your version of the mod that you have installed on your forum against the latest version of the mod. It's compatible with SMF 2.0, and works just like a modification. It adds a new area under the Configuration tab of the Admin area, right above Modification Settings. If you would like this on your forum, click the attachment below to download this tool.

4
Mod Support / Top 10 Posters and Topic Starters
« on: June 15, 2011, 11:51:07 PM »
id:top10postersTop 10 Posters and Topic Starters Stats (Today, Week, Month, and Year)

Maintained by: tyty1234
Original Mod written by: karlbenson
Current Version: 2.6
Compatible With: SMF 2.0
Available Languages: English/utf-8, English_british/utf-8, German/utf-8, Spanish/es/utf-8/es-utf8, Turkish/utf-8


Summary
Adds the top 10 posters and topic starters today, this week, this month, and this year to your stats page (action=stats)

Features
o Adds Top 10 Posters Today, This Week, This Month, and This Year
- Based on Server time including your forum time offset
o Adds Top 10 Topic Starters Today, This Week, This Month, and This Year
- Based on Server time including your forum time offset
o Supported Languages
- English/English-utf8
- English_british/English_british-utf8
- German/German-utf8 (Thanks to Eclipse16V)
- Spanish/Spanish_es (Thanks to Mskina)
- Spanish-utf8/Spanish_es-utf8 (Thanks to shakaran)
- Turkish/Turkish-utf8 (Thanks to eslao and L Lawliet)

I welcome translations for other languages. Please post the translated language strings in the Support Topic.

Installation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.
If you are using SMF 1.1.x, a manual edit will be required for ALL themes (other than the SMF Default Core Theme) which have a custom Stats.template.php. For SMF 2.x, you can select the "Install in Other Themes" option when you install this mod.
If your theme has its own versions of the language files (Modifications.english.php and/or Modifications.english-utf8.php), OR if you're using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

Uninstallation
You can uninstall this mod via the package manager. It is recommended you do it that way.

Useful Links
SMF Package Parser
Manual Installation Of Mods
How Do I Modify Files?

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
What's new in this version?
Released for SMF 2.0
Dropped SMF 1.1.x compatibility
Fixed "roll-over" issue with month calculation.

5
Mod Support / Highlight Unread Topics
« on: June 15, 2011, 11:48:04 PM »
id:HighlightUnreadHighlight Unread Topics

Packaged by: tyty1234
Code based by: Eliana Tamerin
Current Version: 2.0
Compatible With: SMF 2.0
Available Languages: English


Summary
This mod simply highlights new unread topics, including child boards, along side with the "new" image. This option can be accessed via Admin -> Configuration -> Features and Settings -> General.

Installation
This mod should be installed using the Package Manager. No manual edits should be necessary, but if it comes to that resort, please use the Package Parser.

Changelog
What's new in this version?
Released for SMF 2.0
Dropped SMF 1.1.x compatibility

6
Mod Support / Hide Topic Replies
« on: June 15, 2011, 11:46:24 PM »
id:HideTopicRepliesHide Topic Replies

Written by: tyty1234
Current Version: 1.7
Compatible With: SMF 2.0
Available Languages: English, Italian, Portuguese, Portuguese-UTF8, Turkish



Summary
This mod adds an option in the admin panel to enable the ability hide the topic replies from guests, and *tempts* the guests to register to view the replies. This option can be accessed via Admin -> Forum -> Post and Topics -> Topic Settings.

Installation
This mod should be installed using the Package Manager. No manual edits should be necessary, but if it comes to that resort, please use the Package Parser.

Changelog
What's new in this version?
Fixed page index and visibility bug for "Show Posts" for members in profile. (reported by Sapinho and Richardgm)

7
Mod Support / Disable Subject Change
« on: June 15, 2011, 11:43:12 PM »
id:disablesubjectchangeDisable Subject Change

Written by: tyty1234
Current Version: 2.0
Compatible With: SMF 2.0



Summary
This mod adds an option in the admin panel to disable the ability to change the subject of a topic when replying to that topic. This option can be accessed via Admin -> Forum -> Post and Topics.

Installation
This mod should be installed using the Package Manager. No manual edits should be necessary, but if it comes to that resort, please use the Package Parser.

Changelog
What's new in this version?
Released for SMF 2.0
Enabled subject changing for all moderators (board moderators, global moderators)
Slight change of code.
Dropped SMF 1.1.x compatibility. DO NOT use this version for SMF 1.1.x

8
Mod Support / Gender On Memberlist
« on: June 15, 2011, 11:40:20 PM »
id:genderonmemberlistGender On Memberlist

Original Author: ccbtimewiz
Currently Developed by: tyty1234
Current Version: 1.5
Compatible With: SMF 2.0



Summary
This is a modification that will add member gender to the memberlist. You can also sort by male/female or female/male.
Members with no gender get stacked in the middle if you sort by gender, however.

Need Help?
There are two places where you can get help. The support thread on Simple Machines, or the support thread on tytyweb.

Installation
This mod should be installed using the Package Manager. No manual edits should be necessary, but if it comes to that resort, please use the Package Parser.

Changelog
What's new in this version?
Released for SMF 2.0
Dropped 1.1.x support. Do NOT use this version for SMF 1.1.x

9
Mod Support / SSI Topics and Replies
« on: June 15, 2011, 11:37:04 PM »
id:SSITopicSSI Topics and Replies

Original Author: Daniel15
Currently Developed by: tyty1234
Current Version: 2.0
Compatible With: SMF 2.0


Summary
This mod adds a new SSI function that allows you to grab a topic and its replies.

Usage
Basic usage:
Code: [Select]
<?php ssi_topic(int $topicint $num_replies); ?>
$topic - The topic id for the topic you want to grab.
$num_replies - The number of replies you would like to show (provides a "more replies" link if there are more comments than the amount you limit).

Read reply below for advanced usage.

Installation
This mod should be installed using the Package Manager. No manual edits should be necessary, but if it comes to that resort, please use the Package Parser.

Changelog
What's new in this version?
Released for SMF 2.0
Dropped SMF 1.1.x compatibility.
Full re-write of mod.
Ability to grab attachments, and use of negative offsets in $start variable to get last # of replies.
Replaced page index with a "more replies" link (customizable).

10
News / Explanation for my inactivity
« on: March 20, 2011, 08:56:29 PM »
This is for those of who you want to know where I've been.

I've been really busy and never had the time to update any of my mods, and because of school and life getting in the way, I've been moving away from SMF. But a lot of you guys are looking for updates so I'm slowly coming back to give the support you guys need to make my mods work for you guys.

Long story short.

11
News / Site open!
« on: March 20, 2011, 03:18:15 PM »
I've opened! However, I have not uploaded/posted my modifications yet, but that will come along soon, and support for them will be available :)

12
Introductions / Readme
« on: March 19, 2011, 11:31:08 AM »
It's always nice to meet new people. Please do take a minute or two to introduce yourself. :)
Be sure to follow general rules of the forum.

13
Rules & Info / "Why is there a verification code when I post???"
« on: March 19, 2011, 11:25:30 AM »
For extra protection against spam bots, new users in the new user group will be required to enter a verification code before posting a post anywhere on the forums. This remains in effect for that new user for the first five posts. After five posts, the user will be placed in the next group above which is the newbie group, and the user will no longer be required to enter a verification code before posting. This however does not prevent human spam, but nonetheless, it will protect the forum against automated spam bots.

14
Mod Support / Readme
« on: March 19, 2011, 02:08:21 AM »
Each modification has their own support topic. Please post your questions in the respected topics. Be kind and courteous. I'll try to take care of each of your questions as best I can and in a timely manner. Remember to follow the general rules.

15
General Chat / Readme
« on: March 19, 2011, 02:02:52 AM »
This board is intended for general chat only. Please no support questions for mods. Keep everything clean, follow general rules.

Pages: [1] 2