Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Add Search XS BBcode 
 
Find:

Code: [Download] [Hide] [Select]
            'img' => array(
                    'nested' => false,
                    'inurl' => true,
                    ),


After Add:
Code: [Download] [Hide]
  1.             'search' => array(    
  2.                     'nested'    => true,    
  3.                     'inurl'        => false,    
  4.                     'allow_empty'    => false,      
  5.                     ), 


Find:
Code: [Download] [Hide] [Select]
        // IMG
        if($tag === 'img')
        {
            global $config_mg;
            if($this->is_sig)
            {
                return $error;
            }
            // main parameters
            $params = array(
                'src' => false,
                'alt' => false,
                'slide' => false,
            );

            // additional allowed parameters
            $extras = $this->allow_styling ? array('width', 'height', 'border', 'style', 'class', 'title', 'align') : array('width', 'height', 'border', 'title', 'align');


            // [img=blah]blah2[/img]
            if(isset($item['params']['param']))
            {
                
                $params['src'] = ($config_mg['thumbnail_posts'] == 1 ) ? "image_thumbnail.php?pic_id=" . $item['params']['param'] : $item['params']['param'];
                $params['alt'] = $content;
                $params['slide'] = isset($item['params']['slide']) ? $item['params']['slide'] : '';
                $slideshow = ($params['slide']) ? 'lightbox[' . $item['params']['slide'] . ']': 'lightbox';
            }
            // [img src=blah alt=blah width=123][/img]
            elseif(isset($item['params']['src']))
            {
                $params['src'] = ($config_mg['thumbnail_posts'] == 1 ) ? "image_thumbnail.php?pic_id=" . $item['params']['src'] : $item['params']['src'];
                $params['alt'] = isset($item['params']['alt']) ? $item['params']['alt'] : $content;
                $params['slide'] = isset($item['params']['slide']) ? $item['params']['slide'] : '';
                $slideshow = ($params['slide']) ? 'lightbox[' . $item['params']['slide'] . ']': 'lightbox';
                for($i=0; $i<count($extras); $i++)
                {
                    if(!empty($item['params'][$extras[$i]]))
                    {
                        if($extras[$i] === 'style')
                        {
                            $style = $this->valid_style($item['params']['style']);
                            if($style !== false)
                            {
                                $params['style'] = $style;
                            }
                        }
                        else
                        {
                            $params[$extras[$i]] = $item['params'][$extras[$i]];
                        }
                    }
                }
            }
            // [img]blah[/img], [img width=blah]blah[/img]
            elseif(!empty($content))
            {        
                //Added in 033 -LIW -BEGIN
                if ( $config_mg['thumbnail_posts'] != 1 && $max_image_width != 0 && $board_config['liw_enabled'] == 1 && !$this->is_sig && (!$item['params']['width'] || $item['params']['width'] >= $max_image_width))
                {
                    $image_size = @getimagesize($content);
                    $item['params']['width'] = ($image_size[0] > $max_image_width) ? $max_image_width : $item['params']['width'];
                }
                //Added in 033 -LIW -END
                $link_url = $content;
                $params['src'] = ($config_mg['thumbnail_posts'] == 1 ) ? "image_thumbnail.php?pic_id=" . $content: $content;
                $params['alt'] = isset($item['params']['alt']) ? $item['params']['alt'] : (isset($params['title']) ? $params['title'] : '');
                $params['slide'] = isset($item['params']['slide']) ? $item['params']['slide'] : '';
                $slideshow = ($params['slide']) ? 'lightbox[' . $item['params']['slide'] . ']': 'lightbox';
                for($i=0; $i<count($extras); $i++)
                {
                    if(!empty($item['params'][$extras[$i]]))
                    {
                        if($extras[$i] === 'style')
                        {
                            $style = $this->valid_style($item['params']['style']);
                            if($style !== false)
                            {
                                $params['style'] = $style;
                            }
                        }
                        else
                        {
                            $params[$extras[$i]] = $item['params'][$extras[$i]];
                        }
                    }
                }
            }
            
            // generate html
            $html = '<img';
            foreach($params as $var => $value)
            {
                $html .= ' ' . $var . '="' . $this->process_text($value) . '"';
            }
            if(!isset($params['title']))
            {
                $html .= ' title="' . $this->process_text($params['alt']) . '"';
            }
            $html .= ' />';
            // add url
            if(empty($item['inurl']))
            {
                $html = ($config_mg['thumbnail_posts'] == 1 ) ? '<a href="' . $link_url . '" rel="'.$slideshow.'" title="' . $params['alt'] . '">' . $html . '</a>' : '<a href="' . $params['src'] . '" target="_blank" title="' . $lang['OpenNewWindow'] . '">' . $html . '</a>';;
            }
            return array(
                'valid' => true,
                'html' => $html,
                'allow_nested' => false,
            );
        }


After Add

Code: [Download] [Hide] [Select]
       //Search
       if($tag === 'search')  
       {  
//          if($this->is_sig)  
//          {  
//               return $error;  
//          }  
            if($item['iteration'] > 1)  
            {  
                return $error;  
            }  
            $str = '<a href="search.php?search_keywords=' . $content . '" target="_blank">';  
            return array(  
                'valid'        => true,  
                'start'        => $str,  
                'end'        => '</a>'  
                );  
        }



No icon now!! Sorry
 



 
okada1314Send private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Respuesta: Add Search XS BBcode 
 
BBCode  ?
 




____________
ThE KuKa - www.phpBB-Es.COM - Custom Installations phpBB
 
ThE KuKaSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Add Search XS BBcode 
 
This is really useful for supports site.

Moved to XS Mods.

Many Thanks.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Respuesta: Add Search XS BBcode 
 
ThE KuKa wrote: [View Post]
BBCode  ?



Yes!! It is quick search to post

phpBBXS

Code: [Download] [Hide] [Select]
[search]phpBBXS[/search]

 



 
okada1314Send private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron