vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [vBindex] Show Hivemail On vB Index Portal (https://vborg.vbsupport.ru/showthread.php?t=71953)

PirateRadio 11-19-2004 10:00 PM

[vBindex] Show Hivemail On vB Index Portal
 
Hi,

This is just a fast mod to show your new mail messages from hivemail on vB Index. You must have HiveMail >> vB Integration ( http://manual.hivemail.com/topic/vb_303_130 ) installed first.

Open vbindex.php
find:
PHP Code:

if ($deleteshout === true) {
$DB_site->query("DELETE FROM ".TABLE_PREFIX."vbindex_shoutbox WHERE shoutid = '$shoutid'");
$url "$_SERVER[PHP_SELF]?$session[sessionurl]";
eval(
print_standard_redirect('redirect_vbi_shoutdeleted'));
}


after add:
PHP Code:

// HIVEMAIL ADD
// ############################### start new mails ###############################
$show['hive_newemails'] = false;
if (
$vboptions['hive_enabled'] and $bbuserinfo['hiveuserid'] != and ($permissions['hivepermissions'] & H_CANHAVEACCOUNT) and ($permissions['hivepermissions'] & H_CANVIEWNEWMAIL)) {
$show['hive_newemails'] = true;
define('FORUM_PLUGIN'true);
require_once(
$vboptions['hive_filepath'].'/includes/vbulletin_plugin.php');

$unreadmails $DB_Hive->query("
SELECT *
FROM hive_message
WHERE userid = 
$bbuserinfo[hiveuserid]
AND NOT(status & "
.MAIL_READ.")
"
);

$mailbits '';
$nummails $DB_Hive->num_rows($unreadmails);
if (
$nummails 0)
{
$show['hive_newdetails'] = true;
while (
$unread $DB_Hive->fetch_array($unreadmails)) {
$unread['from'] = iif(empty($unread['name']), $unread['email'], $unread['name'].' <'.$unread['email'].'>');
$unread['dateline'] = date($vboptions['dateformat'].' '.$vboptions['timeformat'], $unread['dateline']);
eval(
'$mailbits .= "' fetch_template('hivemail_usercp_mailbit') . '";');
}
}
else
{
$show['hive_newdetails'] = false;
}
}
// END HIVEMAIL ADD 

save and upload

Open vbindex_customblock_1 in templates.

Find:
PHP Code:

Block $box Content 

Replace with:
PHP Code:

<!-- HIVEMAIL ADD -->
<if 
condition="$show['hive_newemails']">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
thead>
<
tr>
<
td class="tcat" colspan="7">
<
br>New E-Mail Messages: ($nummails)</span>
</
td>
</
tr>
</
thead>
<
tbody id="collapseobj_usercp_submails" style="$vbcollapse[collapseobj_usercp_submails]">
<if 
condition="$show['hive_newdetails']">
<
tr class="thead">
<
td class="thead" nowrap="nowrap">From</td>
<
td class="thead" nowrap="nowrap">Subject</td>
<
td class="thead" nowrap="nowrap">Date Received</td>
</
tr>
$mailbits
<else />
<
tr>
<
td class="alt1" align="center" colspan="7"><strong>Sorry No New E-Mail</strong></td>
</
tr>
</if>
<
tr>
<
td align="$stylevar[right]colspan="7" class="tfoot">
<
span class="smallfont"><a href="$vboptions[hive_url]">Go To Your E-Mail Account</a></span>
</
td>
</
tr>
</
tbody>
</
table>
<
br />
</if>
<!-- 
END HIVEMAIL ADD --> 


Save and thats it! Enjoy! Also, please hit install!

Skyline_GT 11-19-2004 11:11 PM

very nice:)
THank

PirateRadio 11-19-2004 11:24 PM

If you install it, please let me know how it goes :)

Lionel 11-20-2004 01:41 AM

That works too well. Unfortunately those messages with long usernames and long subjects mess up the page :-(

So what I did, since this appears only when there are new emails, I placed under the navbar. I am using vbadvanced btw. Thanks, I installed.

Lionel 11-20-2004 01:58 AM

Can you add the option to delete the mail from homepage too without even reading it? (for junk mails)

PixelFx 11-20-2004 10:21 PM

nice, would be cool to see CMPS mod for this as well :)


All times are GMT. The time now is 11:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01545 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete