Thread: vBExternal v1.6
View Single Post
  #129  
Old 09-05-2005, 06:51 PM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this hack had great potential as many of us wanted to start building external pages. It's really a shame ZT has abandoned the hack as it was really close to being quite usable. Maybe some of us can get the features we want coded in ourselves...

Im trying to display news items as well as many of us and displaying the date is really essential to a news posting. I mean without a date its really pointless displaying news items.

I wasted about 3 hours trying to format the date properly. I managed to pull the data from the 'dateline' field but when trying to format it with vbdate() is just doesn't do anything. The output is whitespace. Here is the change I made to vbExternal.php:

Code:
		while($News = $DB->fetch_array($NewestNews)){
		$Data .= ParseTemplate($Template,
							array(
								'threadid'     => $News['threadid'],
								'threadname'   => $News['title'],
								'postuserid'   => $News['postuserid'],
								'postusername' => $News['postusername'],
								'post'         => parse_bbcode2($News['pagetext'], 0, 1, 1, 1),
								'comments'     => vb_number_format($News['replycount']),
								'date'         => vbdate($vboptions['dateformat'], $News['dateline']),
							)
			);
		}
I added the line in color above. If you add the variable {date} to your news.html template you should see the properly formatted date...But you don't. I wish I knew what I was missing here.

If you leave the line as just:

Code:
'date'         => $News['dateline']),
you will see the data is in fact in the array but it looks like a unix timestamp (kinda): 1125843563

Secondly images posted in articles do not work which for my applications really make the hack unusable.

I think if these 2 issues were cleaned up this hack would be the best and only one of its kind...And extremely useful for many of us. Not sure why the author is releasing the same hack for vb3.5 with these rather minor yet glaring issues but I sure hope someone is willing to pick up the reigns.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01727 seconds
  • Memory Usage 1,768KB
  • 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
  • (2)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