Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 03-01-2009, 05:01 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Index Additions - Homepage Display

Hello Everyone,

I am far from a developer, but I understand the full aspects of programming and can work around php coding very well (just not from scratch).

I currently have the mod "vbnow" which is very similar to Twitter. I am attempting to add a simple array to display the updates on the homepage of the forum.

-I have attempted to pull the template information out and add it into Forumhome and that does not work, the code doesn't display any information.
-I have edited the XML document to reflect changes and alterations with no success.
-Added all the VBNOW.PHP file information to the Index.php still with no data populating.
-Copied style over with merged index.php/vbnow.php file and when I copied the style over it removed the entire forum and only displayed the VBNOW.php information which seemed to supersede the main code.

I am at a loss of how to proceed. Would someone please break down the process of how I can merge a modification within the homepage to display?

Links:
Forum Home - http://www.exomagic.com/forum
VBNOW - http://www.exomagic.com/forum/vbnow.php

Your help is greatly appreciated,
Thank you!
Reply With Quote
  #2  
Old 03-02-2009, 05:09 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't see the page, but most likely, you need to query for the information to create an array to be used.
Reply With Quote
  #3  
Old 03-02-2009, 12:51 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is what I thought! After sifting through the scripts the only referencing I can find of the database is in the XML file.

I have also copied the content of the vbnow.php file over to the index.php file. The funny thing is, when I add the styles to the forumhome template it overwrites the original styles and closes the template so it ONLY displays one code.

I have found that this bit of source is what causes the template to not display the main forum, but also causes it to not display any necessary information from VBNOW:

PHP Code:
//Load the navbar
eval('$vbnownavbar .= "' fetch_template('vbnownavbar') . '";');
eval(
'$vbnowmenut .= "' fetch_template('vbnowmenut') . '";');

$navbits construct_navbits(array('' => $vbphrase[vbnow]));
eval(
'$navbar = "' fetch_template('navbar') . '";');

construct_forum_jump();

eval(
'print_output("' fetch_template('vbnow') . '");'); 
Reply With Quote
  #4  
Old 03-03-2009, 04:49 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Out of all that code, you should only need:
PHP Code:
eval('$vbnownavbar .= "' fetch_template('vbnownavbar') . '";');
eval(
'$vbnowmenut .= "' fetch_template('vbnowmenut') . '";');
eval(
'$vbnow = "' fetch_template('vbnow') . '");'); 
Then use $vbnow in your template.
Reply With Quote
  #5  
Old 03-04-2009, 04:05 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will test this out,

So my understanding is take the snippet of code you provided and add this into my Index file. Once that is done, you said call the $vbnow functions in my template and should display properly, correct?

// Edit //

Ok, so I tested it out and the template commands still continues to not work. I can copy an entire style from VBnow over, but it won't echo any of the data, only the style.

Any thoughts?

Thank you!
Reply With Quote
  #6  
Old 03-05-2009, 05:02 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what are you doing to add that code? Where are you adding it?
Reply With Quote
  #7  
Old 03-05-2009, 01:06 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am placing this code into my Index.php to be called and displayed on the homepage. Would this be correct? If not, which file should this be added to?

Thank you! I really appreciate your assistance, I enjoy learning and understanding VB.
Reply With Quote
  #8  
Old 03-06-2009, 04:01 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are just pasting the code you posted - there is more to it, you need that too.
Reply With Quote
  #9  
Old 03-06-2009, 01:35 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What I will do is actually sit down today and sift through the code. Pick out what I need and don't need and see if it will display the VBcodes.

My main goal is to have this display the content when a style variable is issued. Once that is completed I can kinda do a 'process of elimination' and slowly remove the code until my desired results are displayed.

I will update on a result to this.

Thank you for your assistance.
Reply With Quote
Reply

Thread Tools
Display Modes

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:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05962 seconds
  • Memory Usage 2,240KB
  • 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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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