View Single Post
  #208  
Old 12-30-2004, 04:20 PM
wirewolf's Avatar
wirewolf wirewolf is offline
 
Join Date: Jun 2004
Location: New York City
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Editing the html email in the commbull.php file.
In the commbull.php file look for (line numbers are approx.):

Quote:
// line 44
// get css file// comment out
//$sql = "SELECT * FROM ". TABLE_PREFIX."style WHERE userselect > 0 LIMIT 1";
//$cssrow = $DB_site->query_first($sql);
//$css = $cssrow['css'];
// add full site url to gradients, etc in css
//$css = str_replace(' url('," url({$vboptions['bburl']}/",$css);


//line 309
//$uselogo = $cbgLogo ? "<img src=\"$cbgLogo\">" : ''; // comment out


// line 317
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> // start here!!
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://yoursite.com.net/folder/vb.css" /> //hard code in your stylesheet - I copied my defalut forum sheet, renamed it as vb.css, and placed it in a different folder - note full url - did same with full url to my logo too - see below
</head>
<body><br />
<img border="0" src="http://yoursite.com/folder/logo2.jpg"><font size="4" face="arial,helvetica"><B>&nbsp; <a href="{$vboptions['bburl']}">
{$lang['mailsubject']}</a></b></font><br /><br />
<table class="tborder" width="80%" cellpadding="6" cellspacing="1"> // note table width - you have to set this in about four places as you will see in the other tags below
<tr>
<td class="alt1Active">$extramaterial_parsed</td>
</tr>
</table>
<br />
<table class="tborder" width="80%" cellpadding="6" cellspacing="1">
<tr>
<td class="tcat" colspan="2"><font size="3" face="arial,helvetica"><b>
Current Forum Activity</b></td> //typed this phrase in directly - planning to add a phrase variable
</tr>
<tr>
<td class="alt1Active">$lang[todaysdate] $todaysdate1.<br />{$lang['activitysincede']} $todaysdate2 $lang[activitysince]</td>
</tr>
</table><br />


// line 359
$HTML_footer = "<font size=\"2\">$lang[tounsubscribe]
<a href=\"{$vboptions['bburl']}/profile.php?do=editoptions\">{$lang['unsubscribelink']}</a>. //didn't change anything here except for language
$lang[changeprofile]
<br /><br />
$lang[bestregards]<br /><br /><br /></body></html>";

// line 513 - the other sections - most replies, most views, etc. follow this format. it's the table width that counts here.
<table class="tborder" cellspacing="2" cellpadding="6" width="80%">
<tr>
<td class="tcat" colspan="7"><b>{$lang['latestthreads']}</b></td>
</tr>
<tr class="alt1Active">
<td><b>{$vbphrase['title']}:</b></td>
<td><b>{$vbphrase['thread_starter']}:</b></td>
<td><b>{$lang['threadstartdate']}:</b></td>
<td><b>{$vbphrase['replies']}:</b></td>
<td><b>{$vbphrase['views']}:</b></td>
<td><b>{$vbphrase['last_post']}:</b></td>
<td><b>Last Post by:</b></td> // typed in directly. planning to add a phrase variable
</tr>

// line 918
<table class="tborder" border="0" width="80%"> // note width
<tr class="tcat">
<td><font size="2" face="arial,helvetica"><b>{$lang['upcoming_events']}: <a href="http://yoursite.com/forum/calendar.php?">Click here to
view this Months' Calendar</a></b></td> // note hard code to calendar
</tr>

// line 1064
<table border="0" class="tborder" width="80%"> // note width
<tr class="tcat">
<td colspan="2"><b>{$vbphrase['user']} {$vbphrase['info']}:<b></td>
</tr>
<tr class="alt1">
<td><b>{$lang['userdetails']}</b></td>
</tr>
<tr class="alt1">
<td>{$lang['yourusername']}: "\$username"</td>
</tr>
<tr class="alt1">
<td><a href="{$vboptions['bburl']}/login.php?do=lostpw">{$lang['forgotpass']}?</a></td>
</tr>
<tr class="alt1">
<td>{$lang['youhave']} \$posts {$vbphrase['posts']}</td>
</tr>
<tr class="alt1">
<td>{$lang['youregistered']} \$joindate</td>
</tr>
<tr class="alt1">
<td>{$lang['yourlastactivity']} \$lastactivity</td>
</tr>
</table><br />
Try to keep the html email simple and as small (file size) as possible. Users get pissed (as I do) with over sized html emails. Mine is only about 15 kb's
I didn't mess around with the poll sections. I only have three on my forum, and thay don't update much. But if you want to edit the html for these, or any part of the html, just look in the commbull.php file for any <table>, <tr>, <td> start tags.
Basically, the html output is a bunch of table structures, but they are spread out in the commbull.php file. I'm going to experiment with making a commbull html email template with the variables in it, and just have the commbull.php script call it up. Language changes are easy, just go to the commbull_phrase.php file (thinking of switching that over to phrase variables too!)
As always, MAKE and save a copy of the file prior to editing. Make your changes a little at a time, then send the bulletin to yourself (admin) and take a look. I must have sent myself at least twenty before I was satisfied.

Here's my how my final edit html email bulletin looks like:
http://shipmodeling.net/forumnewsletter.html
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01708 seconds
  • Memory Usage 1,791KB
  • 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)bbcode_quote
  • (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