View Single Post
  #255  
Old 08-01-2009, 08:32 PM
jibi jibi is offline
 
Join Date: Aug 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know it was asked a time or two, so I decided to have a crack at streamlining the vBulletin Blog add-on. Below are the changes that I made that are basically in alignment with the rest of the style. Depending on requests from my team, this may be expanded on. This allows for simple viewing of the recent blog entries (blog home), individual blogger entry list, blog content and comments, and quick comment submission.

BLOG
Code:
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>

<if condition="$vboptions['externalrss']">
	<if condition="$show['bloguserinfo']">
		<link rel="alternate" type="application/rss+xml" title="<phrase 1="$vboptions[bbtitle]" 2="$blogrssinfo[blog_title]">$vbphrase[blog_user_rss_feed]</phrase>" href="blog_external.php?type=RSS2&amp;bloguserid=$blogrssinfo[bloguserid]" />
	</if>
	<link rel="alternate" type="application/rss+xml" title="<phrase 1="$vboptions[bbtitle]">$vbphrase[blog_rss_feed]</phrase>" href="blog_external.php?type=RSS2" />
</if>

<if condition="$show['pingbacklink']"><link rel="pingback" href="$pingbackurl" /></if>
<if condition="$show['trackbackrdf']">
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
	rdf:about="$abouturl"
	dc:identifier="$abouturl"
	dc:title="$bloginfo[title]"
	trackback:ping="$trackbackurl" />
</rdf:RDF>
-->
</if>

$headinclude
<if condition="$usercss_profile_preview">
<style type="text/css" id="vbulletin_user_css">
<!--
$usercss_profile_preview
-->
</style>
</if>

<if condition="$show['inlinemod'] OR $show['inlinemod_trackback'] OR $show['quickcomment']">
	<script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script>
	<script type="text/javascript" src="clientscript/blog_inlinemod.js?v=$vboptions[simpleversion]"></script>
</if>
<if condition="$show['datepicker']">
	<script type="text/javascript" src="clientscript/vbulletin_date_picker.js?v=$vboptions[simpleversion]"></script>
	<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_date_picker.css?v=$vboptions[simpleversion]" />
	<script type="text/javascript">
	<!--
	vbphrase['sunday']    = '$vbphrase[sunday]';
	vbphrase['monday']    = '$vbphrase[monday]';
	vbphrase['tuesday']   = '$vbphrase[tuesday]';
	vbphrase['wednesday'] = '$vbphrase[wednesday]';
	vbphrase['thursday']  = '$vbphrase[thursday]';
	vbphrase['friday']    = '$vbphrase[friday]';
	vbphrase['saturday']  = '$vbphrase[saturday]';
	-->
</script>
</if>
<if condition="$show['registeruserid']">
<script type="text/javascript">
<!--
	vBulletin.register_control("vB_Blog_Userid", "$bloguserid");
//-->
</script>
</if>
<if condition="$show['titlefirst']">
	<title>$pagetitle - $vboptions[bbtitle]</title>
<else />
	<title>$vboptions[bbtitle] - $pagetitle</title>
</if>
</head>
<body $onload>
$header
$navbar

$content
<div class="cleardiv"></div>

$footer
</body>
</html>
blog_comment
Code:
<ul>
<li>
$response[date] | $response[time]
</li>
<li>
<a class="bigusername" href="member.php?$session[sessionurl]u=$response[userid]">$response[username]</a>
</li>
<li id="comment_text_$response[blogtextid]">$response[message]</li>
</ul>
blog_entry
Code:
<ul>
<li>
$blog[date] | $blog[time]
</li>
<li>
<strong><a href="blog.php?$session[sessionurl]b=$blog[blogid]">$blog[title]</a></strong><br />
<a href="blog.php?$session[sessionurl]u=$blog[postedby_userid]">$blog[postedby_username]</a>
</li>
<li id="entry_text_$blog[blogid]">$blog[message]<if condition="$show['readmore']">...</if><br />
<a href="blog.php?$session[sessionurl]b=$blog[blogid]" style="float:$stylevar[right]">$vbphrase[continue_reading]</a>
</li>
</ul>
blog_home
Code:
<h1><phrase 1="Port3101.org">$vbphrase[blogs_from_the_members_of_boardname]</phrase></h1>
<ul>$recentblogbits</ul>

<script type="text/javascript" src="clientscript/blog_ajax_latest.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
	blogLatest = new vB_AJAX_BlogLatest('blogLatest');
//-->
</script>
blog_home_list_entry
Code:
	<li style="text-align:left" class="inline">
	<span style="align:left"><a href="blog.php?$session[sessionurl]b=$updated[blogid]" title="$updated[postedby_username], $updated[postdate]">$updated[title]</a></span>
		<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap"> <!-- <a href="member.php?$session[sessionurl]u=$updated[postedby_userid]"> --> $updated[postedby_username]: $updated[postdate]<!-- </a> --> </div>
	</li>
blog_list_entries
Code:
$blogbits
blog_show_entry
Code:
<h1 id="blog_title">$bloginfo[title]</h1>
<ul>
<li>
$blog[date] | $blog[time]
</li>
<li>
<a class="bigusername" href="blog.php?$session[sessionurl]u=$blog[postedby_userid]">$blog[postedby_username]</a>
</li>

<li id="blog_message" style="margin-bottom:10px">$blog[message]</li>
</ul>

<h1 id="comments_heading">$vbphrase[comments]</h1>
$responsebits

<ul>
<li class="inline">
&laquo; <a href="blog.php?$session[sessionurl]b=$bloginfo[blogid]&amp;goto=prev">$vbphrase[prev]</a>
 | <a href="blog.php?$session[sessionurl]">$vbphrase[main]</a>
 | <a href="blog.php?$session[sessionurl]b=$bloginfo[blogid]&amp;goto=next">$vbphrase[next]</a> &raquo;
</li>
</ul>

<if condition="$show['quickcomment']">
<!-- quick comment -->
<h1>$vbphrase[post_a_comment]</h1>
<ul>
<li style="text-align:center;">
<form action="blog_post.php?$session[sessionurl]do=postcomment" method="post" name="vbform" id="qc_form" style="display:block; margin:0px; padding-top:24px; clear:both">
$messagearea
<br />
<input type="hidden" name="fromquickcomment" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="postcomment" />
<input type="hidden" name="b" value="$bloginfo[blogid]" />
<input type="hidden" name="loggedinuser" value="$bbuserinfo[userid]" />
<input type="hidden" name="parseurl" value="1" />
<input type="submit" class="button" style="margin-top: 20px;" value="$vbphrase[post_now]" accesskey="s" title="(Alt + S)" name="sbutton" tabindex="2" id="qr_submit" onclick="clickedelm = this.value" />
</form>
</li>
</ul>
<!-- end quick comment -->
</if>

<script type="text/javascript">
<!--
	vBulletin.register_control("vB_Blog_Tag", "$bloginfo[blogid]");
//-->
</script>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01307 seconds
  • Memory Usage 1,806KB
  • 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
  • (7)bbcode_code
  • (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