|
|
| Author |
Message |
Hopper
New User
Joined: 15 Jan 2008
Posts: 8
|
Posted: January 19th 2009, 1:14 am Post subject: post iframe thingy |
|
|
extremely simple, quick and dirty hack that allows people who know the secret to start a topic with an iframe with a website as the contents
(the secret switch in the defauilt install is to name the topic "~,http://www.website.com" (without the quotes)
but the ~ can be changed to something else as long as you change both
| Code:
|
if ($thinnerw[0] == "~")
|
to install the instructions are simple
open
viewtopic.php
find
| Code:
|
//
// Censor topic title
//
if ( count($orig_word) )
{
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
}
|
after add
| Code:
|
$sumow = $topic_title;
$thinnerw = explode(",",$sumow);
if ($thinnerw[0] == "~") {
$topic_title=$thinnerw[1];
}
|
find
| Code:
|
$template->assign_block_vars('postrow', array(
|
before add
| Code:
|
$sumo = $post_subject;
$thinner = explode(",",$sumo);
if ($thinner[0] == "~") {
$test=$message;
$message=supperhappyfuntime($thinner[1]);
$post_subject=$thinner[1];
}
|
find
| Code:
|
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
after add
| Code:
|
function supperhappyfuntime($test) {
$message="<iframe width=100% height=600 src=".$test."></iframe>";
return $message;
}
|
|
|
| Back to top |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
Hopper
New User
Joined: 15 Jan 2008
Posts: 8
|
Posted: February 6th 2009, 11:16 am Post subject: |
|
|
| i hope so too, btw how would i add that to your db or is that your job? |
|
| Back to top |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
Hopper
New User
Joined: 15 Jan 2008
Posts: 8
|
Posted: February 11th 2009, 12:09 pm Post subject: |
|
|
almost forgot
viewforum.php
search for
| Code:
|
$template->assign_block_vars('topicrow', array(
|
before add
| Code:
|
$sumow = $topic_title;
$thinnerw = explode(",",$sumow);
if ($thinnerw[0] == "~") {
$topic_title=$thinnerw[1];
}
|
or the switch will be visible in the forum list
and in search.php
find
| Code:
|
$template->assign_block_vars("searchresults", array(
|
before add
| Code:
|
$sumow = $post_subject;
$thinnerw = explode(",",$sumow);
if ($thinnerw[0] == "~") {
$post_subject=$thinnerw[1];
$sumow = $topic_title;
$thinnerw = explode(",",$sumow);
if ($thinnerw[0] == "~") {
$topic_title=$thinnerw[1];
}
|
find
| Code:
|
$template->assign_block_vars('searchresults', array(
|
before add
| Code:
|
$sumow = $topic_title;
$thinnerw = explode(",",$sumow);
if ($thinnerw[0] == "~") {
$topic_title=$thinnerw[1];
}
|
to hide the switch from the search
[/code] |
|
| Back to top |
|
 |
|