News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Login and Recent post - Adding in Homepage from Forum

Started by Sudhakar Arjunan, July 08, 2008, 10:44:19 AM

Previous topic - Next topic

Sudhakar Arjunan

Hey Smf friends,

I am trying to write code for adding all ssi related functions to my homepage from Forum page.

I have used SSI.php in the opening tag and changed my homepage as .php page.

Now i have removed all the bugs and the index.php homepage is showing.

When i tried to insert <?php ssi_recentTopics(); ?> i dont have any output.

Even i have used commands with Flush();

Any idea to show the ssi tag functions (Login and recent post) with in my site.


My forum page : http://forum.itacumens.com or http://itacumens.com/forum/

My Test Homepage : http://www.itacumens.com/index_homepage_test3.php

My SSI example page i have used : http://itacumens.com/forum/ssi_examples.php

My Idea @ this page : http://itacumens.com/images/smf/

Any help would be Appreciated.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Nathaniel

Have you included the SSI.php file, with the correct location?

You need to have this at the beginning of your html index page, but you will need to change the "SSI.php" so that it matches the location of your SSI.php file.
<?php require("SSI.php"); ?> 

If that's not the problem then try to use some of the other functions to see if any of them work.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Sudhakar Arjunan

Quote from: LHVWB on July 08, 2008, 09:17:17 PM
Have you included the SSI.php file, with the correct location?

You need to have this at the beginning of your html index page, but you will need to change the "SSI.php" so that it matches the location of your SSI.php file.
<?php require("SSI.php"); ?> 

If that's not the problem then try to use some of the other functions to see if any of them work.


Thanks for your reply.

Check out the code of my index.php homepage file starts like.


<?php require('/home/itacumen/public_html/forum/SSI.php'); //put the correct  path here

$ssi_gzip = true;  //true--means gzip is turned on.

$ssi_ban = true;  //true--means a banned forum user will be banned also in the SSI page.

$ssi_theme = 6; //uses the theme [images, buttons, colors] Specifiy theme ID here. Comment out to use your sites  default theme

ob_start();  //is needed not to get errors.

global $context;

$context['page_title'] = "$mbname - Home"; //needs to go above template_main_above(); to display Page Title


echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<head>


Then i have went through the recent topic and all codes, but its not even showing up.
Any help Please.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Sudhakar Arjunan

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Nathaniel

Okay, attached is a small example which attempts some of the things that you want. It does at least show you where you can put some of the things you want.

You want to do quite a bit, so I highly recommend that you look over the SSI.php documentation and try to learn a bit about php. I am happy to help you with it, but I am less inclined to make it for you, because I don't have the time. ;)

Just a few comments, every line in your html code was separated by about 6 blank lines, I used a php script to remove all of those, because they make it completely impossible to actually edit the code itself. Also you had all of your hmtl code inside an echo ''; command, this is pointless and makes it harder to read. I have fixed that as well.

SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Sudhakar Arjunan

Hi LHVWB,

I have been testing this page for last few minutes.

shows some error at line 3.


Warning: require(SSI.php) [function.require]: failed to open stream: No such file or directory in /home/itacumen/public_html/index_test_lhvwb.php on line 3

Warning: require(SSI.php) [function.require]: failed to open stream: No such file or directory in /home/itacumen/public_html/index_test_lhvwb.php on line 3

Fatal error: require() [function.require]: Failed opening required 'SSI.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/itacumen/public_html/index_test_lhvwb.php on line 3


Then i have just checked and included the base path at line 3 and its working.

Check this link i have hosted at my public html folder.

Got it done. Thanks for your help LHVWB. I hope some small updates & Css work need to complete the codes. Will work now and complete it as soon. You to give me some suggestions on it.

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Sudhakar Arjunan

Hi LHVWB,

Thanks for this good work you have did.

could you help me in customizing two things.

One the Login should validate when the user is good or banned one.

Then user name as be shown with welcome.

Second the each and individual title in the latest post of a particular board as to be shown.

Thanks you LHVWB . Now i got my site somehow structured.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Advertisement: