News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

PHP Coded site Integration Question

Started by zZJihadZz, January 26, 2009, 12:59:07 AM

Previous topic - Next topic

zZJihadZz

Hey everyone,
I've run into a bit of a problem here. I've figured out the whole thing about the SSI file and integrating finally, but I want to do something more specific.  Ive included what i want in text on a picture, which may make it easier to understand. Thanks guys!
Jihad

CLICK HERE FOR THE PICTURE [nofollow]

Kindred

your explanation was rather rambling and unclear...  but I think you are saying that you want to use ssi_recentPosts, but you want to format the display using alternating colored lines...

You claim to be familiar with SSI.php... if so, you need to read the SSI functions somewhat closer.
You use type array instead of echo, which allows your to spit out the SSI data in any format you want.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

zZJihadZz

Sorry for how badly I misplaced that question, I was in a hurry to get it done.
My question was, that on the template, i have made ther "Recent Posts" content box alternate color backgrounds every line down. If i simply paste the recent posts SSI tag/function there it wont alternate colors, it will just stay the same. It is a little hard to explain but I hope this makes it easier.
Thanks

Kindred

right....    so you can do exactly that by using the ARRAY version of the function return rather than the ECHO version.

if you return the function as an array, then you can read out the data in any format that you want, including alternating colored lines.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

zZJihadZz

Thanks
Also, are there any pages thouroughly describing how to use this array function? i am not fully experienced with all this, so a link to a reference page would be great. I've searched, but have barley been able to find anything >:(

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

zZJihadZz

Im having trouble deciphering this. I just cant seem to figure it out. Could I maybe get a example for Memebrs online by any chance where it simply says XY Members online, YX Guests or something similar? Thanks. And does this require quite a bit of knowlegde in programming or something?

Kindred

well, it requires the ability to read basic php code...

function ssi_whosOnline($output_method = 'echo')



so...

<?php
require_once('SSI.php');
global 
$txt;

$list_onlinessi_whosonline('array');
echo 
'
'
$list_online['num_guests'], ' '$list_online['num_guests'] == $txt['guest'] : $txt['guests'], ', '$list_online['num_users_online'], ' '$list_online['num_users_online'] == $txt['user'] : $txt['users'];
?>


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

zZJihadZz

Thnks. I was trying too find an example for so long, but now I realize that this is beyong my knowledge, and I think ill stick to echot requests until I learn more and gain more experience.
But thanks anyway :D

Advertisement: