Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2009, 01:44 AM
ButtKnocker ButtKnocker is offline
 
Join Date: Oct 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Best way to create a headline title links only section?

I asked this question at vbulletin.com forum but am getting no response. Can anybody here help me in the right direction?

What would be the best way to create a headlines section on the CMS? What I mean by that is to create a section with nothing but title links on it only as the primary content. No author, no snippet text preview, just straight up headline title links only. A whole page of them, definitely more than 20. Probably more like 50.

I know how to make a section and call it "Headlines" and to pick the layout & grid that I want for it. But there's more to it, most notably the primary content thats getting in my way...I think.

My current approach is to edit the vbcms_content_article_preview template. I know how to edit that template to show title links only. I've tried it and it works perfectly. Does exactly what I want it to. The only problem is that all my other sections use that same template for the primary content and I don't want all my sections to be headlines only.

So I thought the easiest approach would be to create a new template, with the edited code from the original, to show title links only, and name that template vbcms_content_article_preview_headlines

Did that but not sure what to do from there...but I do have some questions regarding that.

How can I manipulate the layout manager to where I can delete primary content? If I'm making a headlines layout I don't want the default primary content. Currently you can delete everything in the layout manager except for the primary content. My goal is to be able to delete primary content and have headlines content in it's place. I understand you can flatten a grid and edit your own html but I'm unsure if thats part of the process I need to do.

That new template I made (vbcms_content_article_preview_headlines), how do I get the system to call on it? Does it have to do with plugins? Should I have created a new plugin (with my headlines code) instead of adding a new template? If so how do I identify the hook location for where the primary content normally goes (because thats where I would be inserting the headline links)?

Also, I believe it's possible to achieve what I'm wanting with customized widgets but am I correct in thinking thats the wrong approach due to the overhead (resources) being too high and the cache system in place?

FYI...here is my vbcms_content_article_preview_headlines template code:
Code:
{vb:raw css}

<div class="article_preview">
	<div class="title">
		<h3 class="article_preview">
		<vb:if condition="$showtitle">
			<a href="{vb:raw page_url}"><span>{vb:raw title}</span></a>&nbsp;
		</vb:if>
		<vb:if condition="$can_edit">
			<a class="edit" href="{vb:raw page_url}/edit">
			<img class="editimage" src="{vb:raw vboptions.bburl}/{vb:stylevar imgdir_cms}/edit_small.png" alt="Edit" />
			</a>
		</vb:if>
		</h3>  
	</div>

<vb:comment>
	<!--  Display Section Location -->
	<div class="cms_article_section_location">
		{vb:rawphrase section}: <a href="{vb:raw section_url}">{vb:var parenttitle}</a>
	</div>
</vb:comment>

	<div class="fullwidth article_preview_contents<vb:if condition="$showpreviewonly"> showpreviewonly</vb:if>">
		<vb:if condition="$showpreviewonly">
			<vb:if condition="$previewvideo">
				{vb:raw previewvideo}			
			<vb:elseif condition="$previewimage" />
				<a href="{vb:raw page_url}">
			</vb:if>
		</vb:if>
	</div>

</div>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:48 AM.


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.03255 seconds
  • Memory Usage 2,159KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)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
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete