SMF Support > SMF 2.0.x Support

Using SSS.PHP

<< < (2/3) > >>

Luis-:
I'm using bestfriendavinash's code to see if I can find a way of fixing it for him, it's already included at the top of the code.

MrPhil:

--- Quote from: Luis- on April 22, 2012, 11:00:37 AM ---I've tried your code and you could always used
--- Code: ---<?php ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo'); ?>
--- End code ---

--- End quote ---
Uh, that's not correct. This is a call to the ssi_recentTopics() function. What you are doing is defining local variables ($num_recent, $exclude_boards, etc.) in your code and eventually passing on the values to the function. It unnecessarily creates local variables, and if they happen to already exist and are in use, could mess up your code.

--- Code: ---<?php ssi_recentTopics(8, null, null, 'echo'); ?>
--- End code ---
is correct. If you need the variables later on, you could define them before this call, and use the variables in the call:

--- Code: ---<?php 
$num_recent = 8;
ssi_recentTopics($num_recent, null, null, 'echo'); 
?>
--- End code ---

bestfriendavinash:

--- Quote from: Luis- on April 22, 2012, 11:27:15 AM ---Hmm, i'm confused with this as much as you are. I'll keep trying it though. I've gotten it to work a little though, http://forum.sa-a.co.cc/test.php.

--- End quote ---

Your page is being blocked by my antivirus..

Luis-:
Hmm, that's odd.

bestfriendavinash:

--- Quote from: Luis- on April 22, 2012, 11:27:15 AM ---Hmm, i'm confused with this as much as you are. I'll keep trying it though. I've gotten it to work a little though, http://forum.sa-a.co.cc/test.php.

--- End quote ---

I disabled my antivirus to see your page... it was much like that what I wanted to get... but with a little change... if you can add the member's name after 'by' or remove the 'by'... anyway what code did you used for this...as the code you have suggested me didn't worked in this way for me



--- Quote from: MrPhil on April 22, 2012, 12:50:09 PM ---
--- Quote from: Luis- on April 22, 2012, 11:00:37 AM ---I've tried your code and you could always used
--- Code: ---<?php ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo'); ?>
--- End code ---

--- End quote ---
Uh, that's not correct. This is a call to the ssi_recentTopics() function. What you are doing is defining local variables ($num_recent, $exclude_boards, etc.) in your code and eventually passing on the values to the function. It unnecessarily creates local variables, and if they happen to already exist and are in use, could mess up your code.

--- Code: ---<?php ssi_recentTopics(8, null, null, 'echo'); ?>
--- End code ---
is correct. If you need the variables later on, you could define them before this call, and use the variables in the call:

--- Code: ---<?php 
$num_recent = 8;
ssi_recentTopics($num_recent, null, null, 'echo'); 
?>
--- End code ---

--- End quote ---

We were discussing on array method...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version