PDA

View Full Version : Index Additions - Homepage Display


Mr-Moo
03-01-2009, 05:01 PM
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:

//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:
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.