Page 1 of 1

Custom Module That Uses PHP

Posted: 10. December 2015 03:17
by HoodieWeather
I'd like to have a custom model that use's php.
I have a chatbox for my website thats ran on wordpress. I use http://www.shoutmix.com/v3/ for the chatbox, not a fan of the forum chatboxes, I'd like to use

Code: Select all

<?php  function shoutmixwalkingdead($user_identity = '') {
	return htmlspecialchars(
		'&name='.rawurlencode($user_identity)
		.'&code='.md5($user_identity.'7f7ebe7421'));
}
?>

<?php if ( $user_ID ) : ?>
<iframe title="walkingdead" src="http://www.shoutmix.com/?nighttimescene<?=shoutmixwalkingdead($user_identity);?>" width="170" height="555" frameborder="0" scrolling="auto"> allowtransparency="true"
<a href="http://www.shoutmix.com/?nighttimescene<?=shoutmixwalkingdead($user_identity);?>">View shoutbox</a>
</iframe>
<?php endif;  ?>
In the custom box. I've tried already and the chatbox doesnt show. so in the future I think it would be nice to have a box that uses php.

Also.. on top of that on my main website, I have it so that when users log in that name will be used in the chatbox also.. and so that users can't change names when chatting. Just helps me out. It's just taking info from the database.

So PLEASE have a cube that uses PHP.. and that can grab info from databases.

Re: Custom Module That Uses PHP

Posted: 10. December 2015 10:22
by Marc
Allowing PHP in custom blocks created from a web end frontend have some serious security implications. This would potentially give an attacker direct file system access.
Therefore, we will not support this in Board3 Portal.

You should rather have a look at this if you really require PHP:
https://github.com/board3/Board3-Portal ... rtal-2.1.x

Re: Custom Module That Uses PHP

Posted: 10. December 2015 17:12
by Louis7777
Marc wrote:You should rather have a look at this if you really require PHP:
https://github.com/board3/Board3-Portal ... rtal-2.1.x
I have a similar request.

Sometimes all I want from a custom module is a custom appearance. For example, a news module with rearranged elements (DIVs, date, author etc.), and other colors.

And I have to clone a module and create a new module just for that.

But what if each module allowed custom templates? Just like the Pages extension does.

What do you think - could you do that?

And maybe HoodieWeather and others who want to use php could benefit from that by using template events and variables?

Re: Custom Module That Uses PHP

Posted: 10. December 2015 22:47
by HoodieWeather
Marc wrote:Allowing PHP in custom blocks created from a web end frontend have some serious security implications. This would potentially give an attacker direct file system access.
Therefore, we will not support this in Board3 Portal.

You should rather have a look at this if you really require PHP:
https://github.com/board3/Board3-Portal ... rtal-2.1.x


Damn... that's not cool at all.. ehh.. I have it running right now.. I just don't like the other chatbox programs, I mean I pay 20 a year for the prem account for shoutmix, don't want it to just go without using it. But okay.. I've never had a problem with security and such since I have it working on my wordpress end page. Grabs usernames fine, and it doesn't allow them to change name in chatbox. Wonder how something like this could be a security flaw or such.. by the way nice board, I have it installed now.. There's way to many boards, seems like this is the only one that actually updates.. Cause I don't think http://www.phpbbireland.com they tend to there board anymore..

I'm actually on 3.0.13 I need to learn how to update my board. I'm working off your board @ 2.0.2 I see you have a new board out. I think I should update.. But I'm sure if some mods will work with earlier versions?