| Author |
Message |
ChadK
Sergeant


Joined: Mar 26, 2004
Posts: 75
|
Posted:
Tue Mar 30, 2004 9:31 am |
  |
Anyway, back to the problem with the newer phpbb not allowing IMG tag..
the file:
includes/bbcode.php
Lines 322-323:
| Code: |
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); |
Instead of just adding |php in there next to png, is there another way to make it allow php in the IMG tag if it's a specific file? Say:
http://domainname/signature.php
If it MATCHES that, then display it? |
_________________
 |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 11:21 am |
  |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 11:23 am |
  |
Strange, it works on this page but not on my page.
DANG>
Any help for this long standing Noob?
"Still Noobing after all these years" |
_________________
 |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 11:33 am |
  |
Nope. It print out the code on this one also.
However in the forum it works if I put my sig. in.
Im going to go to the Bar and figure this out. With my friend Miller and Bud.  |
_________________
 |
|
    |
 |
foxyfemfem
Support Staff


Joined: Jan 23, 2003
Posts: 668
Location: USA
|
Posted:
Tue Mar 30, 2004 12:09 pm |
  |
Hello,
I am using nukebb 2.0.8 on my website and the signature work perfect without the need to add php to the new includes/bbcode.php file. I did not copy the files from bb2nuke since I have tons of hacks on my website I manually added all the codes from phpbb.com Therefore, everything work just fine on my website. |
_________________ If you shoot for the moon and miss, you'll still be amongst the stars. |
|
   |
 |
Stephen2417
Major


Joined: Dec 26, 2003
Posts: 1135
Location: Bristolville, OH (US)
|
Posted:
Tue Mar 30, 2004 12:17 pm |
  |
Thanks soo much Tank.  |
|
|
      |
 |
Phoenix
Nuke Soldier


Joined: Feb 15, 2003
Posts: 27
Location: Netizen
|
Posted:
Tue Mar 30, 2004 4:10 pm |
  |
Twelves,
Maybe silly question, but do you have BBCode ON?
Otherwise your sig BBCode looks OK.
However, images/signature.png is a missing file. |
_________________
 |
|
    |
 |
ChadK
Sergeant


Joined: Mar 26, 2004
Posts: 75
|
Posted:
Tue Mar 30, 2004 5:53 pm |
  |
Try using [ img ]http://asdasdasdasd/sig..[ /img ]
that works for me..
but I also had to edit bbcode.php on my site. |
_________________
 |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 6:12 pm |
  |
Phoenix: what do you mean do I have BBCode ON? How do I turn it on?
Below is my code in bbcode I did edit it:
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png|php )))\[/img\]#sie",[/quote]Twelves,
Maybe silly question,
Hmmmmm.  |
|
|
    |
 |
Phoenix
Nuke Soldier


Joined: Feb 15, 2003
Posts: 27
Location: Netizen
|
Posted:
Tue Mar 30, 2004 6:21 pm |
  |
Twelves,
In your profile, amongst other things, you can set BBCode ON or not.
You can also Disable BBCode in any post you make.  |
_________________
 |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 6:22 pm |
  |
Working now on this forum. Not on mine. I better stop before I go mad.
Thanks for the help! |
_________________
 |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 6:27 pm |
  |
Thank you Phoenix.
I see that bbcode is on at my page now.
But no cigar.
Thanks for making it clear for my brain.
Its strange at my page it shows up:
And I use the same code on both sigs:
 |
_________________

Last edited by twelves on Tue Mar 30, 2004 6:31 pm; edited 1 time in total |
|
    |
 |
Phoenix
Nuke Soldier


Joined: Feb 15, 2003
Posts: 27
Location: Netizen
|
Posted:
Tue Mar 30, 2004 6:30 pm |
  |
No probs Twelves.
I believe cigars were Bill Clinton's specialty  |
_________________
 |
|
    |
 |
twelves
Lieutenant


Joined: Jul 13, 2003
Posts: 192
|
Posted:
Tue Mar 30, 2004 7:43 pm |
  |
Perhaps someone could post their code for me to check out?
This is my "Sig" code working at Nukecops.
| Code: |
| [url=http://www.guitarchat.net/][img]http://www.guitarchat.net/signature.php[/img][/url] |
As you can see I added the |php in my bbcode.php
Thanks very much. I might be a little obsessed by now...
One thing is I added the cool Java formatting to my forums.
I forget the mod name, but it adds in streaming video to bbcode posting.
| Code: |
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png|php )))\[/img\]
|
 |
_________________
 |
|
    |
 |
Dauthus
Sergeant


Joined: Feb 12, 2003
Posts: 82
Location: USA
|
Posted:
Wed Mar 31, 2004 8:23 pm |
  |
Found the code which works for 2.0.8. I have it on my site for dynamic signatures. Testing the signature here.
I located this code in the phpBB.com forums.
Here is how I changed the includes/bbcode.php. First I commented out the original line of code (Lines 320 and 321). Next I added the following line below that code:
| Code: |
//Substitute below text to allow for dynamic signatures
$text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|php|png))[^ \"\n\r\t<]*?)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); |
This way I didn't lose anything from the original. This works for the newest version of phpbb 2.0.8 and allows dynamic signatures. If you look close you see more than just the |php addon to the code. |
_________________
Vivere disce, cogita mori |
|
    |
 |
|
|