vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Index Additions - Homepage Display (https://vborg.vbsupport.ru/showthread.php?t=207017)

Mr-Moo 03-01-2009 05:01 PM

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!

Dismounted 03-02-2009 05:09 AM

I can't see the page, but most likely, you need to query for the information to create an array to be used.

Mr-Moo 03-02-2009 12:51 PM

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') . '");'); 


Dismounted 03-03-2009 04:49 AM

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.

Mr-Moo 03-04-2009 04:05 PM

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!

Dismounted 03-05-2009 05:02 AM

So what are you doing to add that code? Where are you adding it?

Mr-Moo 03-05-2009 01:06 PM

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.

Dismounted 03-06-2009 04:01 AM

If you are just pasting the code you posted - there is more to it, you need that too.

Mr-Moo 03-06-2009 01:35 PM

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.


All times are GMT. The time now is 02:50 PM.

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.01467 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete