Jump to content


How can i add automaticaly all links to CODE tag?


  • Please log in to reply
1 reply to this topic

#1 pamamolf

pamamolf

    Member

  • Members
  • PipPip
  • 12 posts

Posted 19 February 2012 - 07:16 PM

Hello

I am on the latest ipb and i want to automatically add code tag when a user try to post a link like http://

How can i do it please?


To auto add in code tags the links i was use for version 2.3.x this:

Open sources/classes/bbcode/class_bbcode_core.php

Find:

return ( isset($url['st']) ? $url['st'] : '' ) . "<a href=\"".$url['html']."\" target=\"_blank\">".$show."</a>" . $url['end'];
Replace with:

								$html = $this->wrap_style( 'code' );

				return "<!--c1-->{$html['START']}<!--ec1-->{$url['html']}<!--c2-->{$html['END']}<!--ec2-->";
				
				//return ( isset($url['st']) ? $url['st'] : '' ) . "<a href=\"".$url['html']."\" target=\"_blank\">".$show."</a>" . $url['end'];

It was so easy but i can't find a way to do this in the new IPB 3.2..3 :(

Thank you

#2 pamamolf

pamamolf

    Member

  • Members
  • PipPip
  • 12 posts

Posted 22 February 2012 - 02:03 AM

Ok i found a solution please delete my topic.

Thank you




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users