Thread: End-User Options - Member Info Latest Threads
View Single Post
  #57  
Old 12-26-2007, 03:37 PM
gforce75 gforce75 is offline
 
Join Date: Sep 2003
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this... open the product and replace it with this code. The only thing I did was I shrunk the tables down to 90%, delete the view, replys, and date column. I expanded the size of the forum name column... so all I did was deletions. This is still the authors work.

If you want to see an example where I shrunk it down, check this link of a profile of a member
http://myffnet.com/forum/member.php?u=39
----------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="mlt" active="1">
<title>Member Info Latest Threads</title>
<description />
<version>1.1.0</version>
<url>https://vborg.vbsupport.ru/showthread.php?threadid=151410</url>
<versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=checkversion&t=151410]]></versioncheckurl>
<apm_releasedate>1183611600</apm_releasedate>
<apm_author>H. Atakan KOC</apm_author>
<apm_relatedurl />
<apm_extrainfo />
<apm_extraedit />
<dependencies>
</dependencies>
<codes>
</codes>
<templates>
<template name="milt_thread" templatetype="template" date="1183625412" username="Zero Relax" version=""><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="90%" align="center">
<tr>
<td width="90%" nowrap="nowrap" class="tcat" colspan="6"><div class="smallfont"><strong>$userinfo[username] - $vbphrase[milt_milt]</strong></div></td>
</tr>

<tr>
<td width="60%" nowrap="nowrap" class="thead"><div class="smallfont">$vbphrase[milt_thread]</div></td>
<td width="15%" class="thead"><div class="smallfont">$vbphrase[milt_last_poster]</div></td>
<td width="25%" nowrap="nowrap" class="thead"><div class="smallfont">$vbphrase[milt_forum]</div></td>
</tr>
$lt_bits
</table>
<br />]]></template>
<template name="milt_thread_bits" templatetype="template" date="1183625990" username="Zero Relax" version=""><![CDATA[<tr>
<td nowrap="nowrap" class="alt1" title="$gthread[message]">
<div class="smallfont">
<strong>
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$gthread_newpost.gif" alt="" border="0" /> <a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$gthread[threadid]">$gthread[title]</a>
</strong>
</div>
</td>

<td nowrap="nowrap" class="alt1">
<div class="smallfont">
<a href="member.php?$session[sessionurl]u=$gthread[userid]">$gthread[musername]</a>
</div>
</td>





<td nowrap="nowrap" class="alt1">
<div class="smallfont">
<a href="forumdisplay.php?$session[sessionurl]f=$gthread[forumid]">$gthread[forum_title]</a>
</div>
</td>
</tr>]]></template>
</templates>
<plugins>
<plugin active="1" executionorder="5">
<title>Member Info Latest Threads</title>
<hookname>cache_templates</hookname>
<phpcode><![CDATA[if (THIS_SCRIPT == "member" and $vbulletin->options['milt_onoff'])
{
$globaltemplates[] = 'milt_thread';
$globaltemplates[] = 'milt_thread_bits';
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>Member Info Latest Threads</title>
<hookname>member_complete</hookname>
<phpcode><![CDATA[if ($vbulletin->options['milt_onoff'])
{
$milt_memberid = $userinfo['userid'];

$miltmax = intval($vbulletin->options['milt_count']);
if ($miltmax <= 0) {
$miltmax = '10';
}

$excludedforums = '';
if ($vbulletin->options['milt_df'] !== '') {
$excludedforums = ',' . $vbulletin->options['milt_df'];
}
$forumpermissions = array();
foreach($vbulletin->forumcache AS $forum) {

$forumpermissions[$forum["forumid"]] = fetch_permissions($forum['forumid']);

if (!($forumpermissions[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums']) {
$excludedforums = $excludedforums . ',' . $forum['forumid'];
}
}
unset($forum);

// get rid of initial comma
$excludedforums = substr($excludedforums, 1);


if ($excludedforums != "") {
$excludedforums = "AND thread.forumid NOT IN ($excludedforums)";
}

$gthreads = $db->query_read("
SELECT
thread.threadid, thread.title, thread.lastpost, thread.forumid,
thread.replycount, thread.lastposter, thread.dateline,
IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views,
thread.visible, user.username, user.userid, user.usergroupid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
forum.title_clean as forum_title, post.pagetext AS message, post.allowsmilie, post.postid
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter)
LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid)
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)
WHERE 1=1
$excludedforums
AND thread.visible = 1
AND post.visible = 1
AND open <> 10
AND thread.postuserid = $milt_memberid
ORDER BY thread.dateline DESC
LIMIT $miltmax");

if ($db->num_rows($gthreads))
{
while ($gthread = $db->fetch_array($gthreads))
{

$gthread['message'] = strip_quotes($gthread['message']);
$gthread['message'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_title(
strip_bbcode($gthread['message'], false, true),
$vbulletin->options['threadpreview']
)));

$gthread['title'] = htmlspecialchars($gthread['title']);
$trans = array("&amp;" => "&");
$gthread['title'] = strtr ($gthread['title'], $trans);

if ($getstats_thread[lastpost] > $vbulletin->userinfo['lastvisit'])
{
$gthread_newpost = 'new';
}
else
{
$gthread_newpost = 'old';
}

$gthread[musername] = fetch_musername($gthread);

$gnpdate = vbdate($vbulletin->options['dateformat'], $gthread['dateline'], true);
$gnptime = vbdate($vbulletin->options['timeformat'], $gthread['dateline']);

eval('$lt_bits .= "' . fetch_template('milt_thread_bits') . '";');

}
eval('$lt_thread .= "' . fetch_template('milt_thread') . '";');
$footer = $lt_thread.$footer;
}
$db->free_result($gthreads);
}]]></phpcode>
</plugin>
</plugins>
<phrases>
<phrasetype name="GLOBAL" fieldname="global">
<phrase name="milt_datetime" date="1183625343" username="Zero Relax" version=""><![CDATA[Date and Time]]></phrase>
<phrase name="milt_forum" date="1183625404" username="Zero Relax" version=""><![CDATA[Forum]]></phrase>
<phrase name="milt_last_poster" date="1183625310" username="Zero Relax" version=""><![CDATA[Posted By]]></phrase>
<phrase name="milt_milt" date="1183624768" username="Zero Relax" version=""><![CDATA[Latest Threads]]></phrase>
<phrase name="milt_replies" date="1183625385" username="Zero Relax" version=""><![CDATA[Replies]]></phrase>
<phrase name="milt_thread" date="1183625268" username="Zero Relax" version=""><![CDATA[Latest Threads]]></phrase>
<phrase name="milt_views" date="1183625366" username="Zero Relax" version=""><![CDATA[Views]]></phrase>
</phrasetype>
<phrasetype name="vBulletin Settings" fieldname="vbsettings">
<phrase name="setting_milt_count_desc" date="1183622760" username="Zero Relax" version="1.0.0"><![CDATA[This option limits the maximum amount of records that can be returned by the latest threads.]]></phrase>
<phrase name="setting_milt_count_title" date="1183622760" username="Zero Relax" version="1.0.0"><![CDATA[Maximum Number Of Threads Show]]></phrase>
<phrase name="setting_milt_df_desc" date="1183623377" username="Zero Relax" version="1.0.0"><![CDATA[Sparate Forums ID By Comma]]></phrase>
<phrase name="setting_milt_df_title" date="1183623377" username="Zero Relax" version="1.0.0"><![CDATA[Disallow Forum ID]]></phrase>
<phrase name="setting_milt_onoff_desc" date="1183622620" username="Zero Relax" version="1.0.0"><![CDATA[Enable Member Info Latest Threads (Yes/No)]]></phrase>
<phrase name="setting_milt_onoff_title" date="1183622620" username="Zero Relax" version="1.0.0"><![CDATA[Enable Member Info Latest Threads]]></phrase>
<phrase name="settinggroup_milt_settings" date="1183622530" username="Zero Relax" version="1.0.0"><![CDATA[Member Info Latest Threads]]></phrase>
</phrasetype>
</phrases>
<options>
<settinggroup name="milt_settings" displayorder="65535">
<setting varname="milt_onoff" displayorder="10">
<datatype>boolean</datatype>
<optioncode>yesno</optioncode>
<defaultvalue>1</defaultvalue>
</setting>
<setting varname="milt_count" displayorder="20">
<datatype>number</datatype>
<defaultvalue>10</defaultvalue>
</setting>
<setting varname="milt_df" displayorder="30">
<datatype>free</datatype>
<defaultvalue>0</defaultvalue>
</setting>
</settinggroup>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
</product>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01119 seconds
  • Memory Usage 1,819KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete