Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

error with bbcode for hiding a content?

Asked Modified Viewed 2,783 times
E
ercutombalak
E
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
asked
Junior Member

hello friends, i want to ask something about hide bbcode,but not about the exist [hide] tag in v7.0. This tag about hiding a text in a forum.You know it was coded in v6.0. now a friend adapted it for v7.0 it is working
today i realised an error about this tag... but the error completely unrelated with this bbcode :):) the error in photogallerY and the private messages
Özel mesaj oku= read the private message...
img233.imageshack.us/img233/8895/adszhr2.jpg
gizli=hidden, hide
this modification has smilar files like other bbcodes
gizli_bbcode_include.php , gizli_bbcode_include_var.php and related image file. This bbcode is used for hiding a text,link, image etc. After the replying post , this hidden content become visible

What do you think about this error?? what must i do for solving this problem?
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: gizli_bbcode_include.php
| Author: burakkk
| Webstie: www.phpfusion-tr.com
| Edit v7 :DjGaripSofi
| Webstie:www.radyogulistan.net
|Codes edit by ercutombalak
|Website:www.ercutombalak.com
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (iMEMBER) {
global $userdata;
$hidequery = dbquery("SELECT post_author FROM ".DB_POSTS." WHERE thread_id = '".$_GET['thread_id']."' AND post_author = '".$userdata['user_id']."'");
$userposted = dbarraynum($hidequery);
if(empty($userposted))
$text = preg_replace('#\[gizli\](.*?)\[/gizli\]#si', ' <img src=\'../images/locked.gif\' alt=\'Gizli &#304;çerik!\'><br><div class=\'quote\' style=\'white-space:nowrap;overflow:auto\'><code style=\'white-space:nowrap\'><b>&#304;çerik Gizlemi&#351;tir,&#304;çeri&#287;i Görebilmek &#304;çin Konuya Cevap Yazmal&#305;s&#305;n&#305;z...<br>(Saçmasapan &#350;eyler Yazanlar Siteden 2 Gün banlanacakt&#305;r...<br>Konuya Yorumlar&#305;n&#305;z&#305; Yada Te&#351;ekkürlerinizi Yazabilirsiniz...)</code></b></div>', $text);
else
$text = preg_replace('#\[gizli\](.*?)\[/gizli\]#si', ' <img src=\'../images/unlocked.gif\' alt=\'Gizli &#304;çerik Aç&#305;ld&#305;.\'><br><div class=\'quote\' style=\'white-space:nowrap;overflow:auto\'><code style=\'white-space:nowrap\'><font color=red>Mesaj &#304;çeri&#287;i;</font><br>\1</code></div>', $text);
}

if (!iMEMBER) {

if(empty($userposted))
$text = preg_replace('#\[gizli\](.*?)\[/gizli\]#si', ' <br><div class=\'quote\' style=\'white-space:nowrap;overflow:auto\'><code style=\'white-space:nowrap\'><b>&#304;çerik Gizlemi&#351;tir,&#304;çeri&#287;i Görebilmek &#304;çin Konuya Cevap Yazmal&#305;s&#305;n&#305;z...<br>(Saçmasapan &#350;eyler Yazanlar Siteden 2 Gün banlanacakt&#305;r...<br>Konuya Yorumlar&#305;n&#305;z&#305; Yada Te&#351;ekkürlerinizi Yazabilirsiniz...)</code></b></div>', $text);
}
?>

0 replies

7 posts

M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

it is no error, it is a notice. it is caused by the logical fact that there is no thread id variable in the photogallery. you could add a check for the existtence of this variable before executing the code.
0 replies
E
ercutombalak
E
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
answered
Junior Member

but what is the relation with bbcodes and private messages and photogallery??
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

$_GET['thread_id'] does not exist in photogalleries or private messages. if a var does not exist, you get a php notice.
0 replies
E
ercutombalak
E
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
answered
Junior Member

i understood in photogallerry and private messages dont have thread id but i cant understand why this notice was given ?? is a connection between bbcodes and photogallery or private messages?
0 replies
W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

The thread_id var is a connection. Don't you get it?
0 replies
E
ercutombalak
E
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
answered
Junior Member

then how can i cancel this connection?
0 replies
B
Basti
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

Your BB-Codes wants to know the $_GET['thread_id'], but in photogalleries or private messages there is no $_GET['thread_id'].
This is the reason of the notice.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

M
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
W
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
E
E
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
B
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet