View Single Post
  #2  
Old 02-04-2014, 11:39 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,548
IntoRain is on a distinguished road
Default

In the file myadoptsview.php:

search this function:
PHP Code:
public function bbcode(){
        
$mysidia Registry::get("mysidia");
        
$adopt $this->getField("adopt");            
        
$document $this->document;
        
$document->setTitle($this->lang->bbcode.$adopt->getName()); 
        
$document->addLangvar($this->lang->bbcode_info);
        
$document->add(new Comment("<br>"));
$forumComment = new Comment("Forum BBCode: ");        
        
$forumComment->setUnderlined();
        
$forumcode "[url={$mysidia->path->getAbsolute()}levelup/click/{$adopt->getAdoptID()}][img]{$mysidia->path->getAbsolute()}levelup/siggy/{$adopt->getAdoptID()}[/img][/url]";        
        
$forumArea = new TextArea("forumcode"$forumcode450);
        
$forumArea->setReadOnly(TRUE);
        
        
$altComment = new Comment("Alternative BBCode: ");        
        
$altComment->setUnderlined();
        
$altcode "[url={$mysidia->path->getAbsolute()}levelup/click/{$adopt->getAdoptID()}][img]{$mysidia->path->getAbsolute()}get/{$adopt->getAdoptID()}.gif\"[/img][/url]";
        
$altArea = new TextArea("altcode"$altcode450);
        
$altArea->setReadOnly(TRUE);
        
        
$htmlComment = new Comment("HTML BBCode: ");        
        
$htmlComment->setUnderlined();
        
$htmlcode "<a href='{$mysidia->path->getAbsolute()}levelup/click/{$adopt->getAdoptID()}' target='_blank'>
                     <img src='
{$mysidia->path->getAbsolute()}levelup/siggy/{$adopt->getAdoptID()}' border=0></a>";
        
$htmlArea = new TextArea("htmlcode"$htmlcode450);
        
$htmlArea->setReadOnly(TRUE);
(
other stuff here...) 
Next to this (in that function!!):

$adopt = $this->getField("adopt");

add this:

$imageLink = $adopt->getImage();

so it looks like this:
PHP Code:
public function bbcode(){
        
$mysidia Registry::get("mysidia");
        
$adopt $this->getField("adopt");
                
$imageLink $adopt->getImage();
(
other stuff here...) 
The image URL can be replaced by putting this {$imageLink} instead. For example:

[img]{$imageLink}[/img]
and
<img src="{$imageLink}'>

So it should look like this now:
PHP Code:
public function bbcode(){
        
$mysidia Registry::get("mysidia");
        
$adopt $this->getField("adopt");
                
$imageLink $adopt->getImage();            
        
$document $this->document;
        
$document->setTitle($this->lang->bbcode.$adopt->getName()); 
        
$document->addLangvar($this->lang->bbcode_info);
        
$document->add(new Comment("<br>"));
        
        
$forumComment = new Comment("Forum BBCode: ");        
        
$forumComment->setUnderlined();
        
$forumcode "[url={$mysidia->path->getAbsolute()}levelup/click/{$adopt->getAdoptID()}][img]{$imageLink}[/img][/url]";        
        
$forumArea = new TextArea("forumcode"$forumcode450);
        
$forumArea->setReadOnly(TRUE);
        
        
$altComment = new Comment("Alternative BBCode: ");        
        
$altComment->setUnderlined();
        
$altcode "[url={$mysidia->path->getAbsolute()}levelup/click/{$adopt->getAdoptID()}][img]{$imageLink}[/img][/url]";
        
$altArea = new TextArea("altcode"$altcode450);
        
$altArea->setReadOnly(TRUE);
        
        
$htmlComment = new Comment("HTML BBCode: ");        
        
$htmlComment->setUnderlined();
        
$htmlcode "<a href='{$mysidia->path->getAbsolute()}levelup/click/{$adopt->getAdoptID()}' target='_blank'><img src='{$imageLink}' border=0></a>";
        
$htmlArea = new TextArea("htmlcode"$htmlcode450);
        
$htmlArea->setReadOnly(TRUE);
(
other stuff here...) 
__________________


asp.net stole my soul.
Reply With Quote