Changeset 20208


Ignore:
Timestamp:
Jan 17, 2013, 5:10:52 PM (8 years ago)
Author:
mistic100
Message:

compatible with question_mark_in_urls = false

Location:
extensions/SmiliesSupport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmiliesSupport/main.inc.php

    r15997 r20208  
    1010if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1111
    12 define('SMILIES_DIR' , basename(dirname(__FILE__)));
    13 define('SMILIES_PATH' , PHPWG_PLUGINS_PATH . SMILIES_DIR . '/');
     12define('SMILIES_DIR', basename(dirname(__FILE__)));
     13define('SMILIES_PATH', PHPWG_PLUGINS_PATH . SMILIES_DIR . '/');
    1414
    1515include_once(SMILIES_PATH.'smiliessupport.inc.php');
  • extensions/SmiliesSupport/smiliessupport.inc.php

    r15997 r20208  
    6262
    6363  $conf_smiliessupport = unserialize($conf['smiliessupport']);
     64  $folder = get_root_url().SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'];
    6465  $def_path = SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/smilies.txt';
    6566  $accepted_ext = array('gif', 'jpg', 'png');
     
    7475        $filename = get_filename_wo_extension($file);
    7576        $v = ':'.$filename.':';
    76         $s = '<img src="'.SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$file.'" alt=":'.$filename.':"/>';
     77        $s = '<img src="'.$folder.'/'.$file.'" alt=":'.$filename.':"/>';
    7778        $str = str_replace($v, $s, $str);
    7879      }
     
    9293        $filename = get_filename_wo_extension($matches[2]);
    9394        $v = '#([^"])'.preg_quote($matches[1],'/').'#';         
    94         $t = '$1<img src="'.SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$matches[2].'" alt=":'.$filename.':"/>';
     95        $t = '$1<img src="'.$folder.'/'.$matches[2].'" alt=":'.$filename.':"/>';
    9596        $str = preg_replace($v, $t, $str);
    9697      }
  • extensions/SmiliesSupport/template/smiliessupport_page.tpl

    r15110 r20208  
    2727<ul style="display:none;">
    2828<li id="SmiliesSupport" class="markItUpButton markItUpDropMenu">
    29   <a id="allsmilies" style="background-image:url({$REPRESENTANT});" title="{'All Smilies'|@translate}"></a>
     29  <a id="allsmilies" style="background-image:url('{$ROOT_URL}{$REPRESENTANT}');" title="{'All Smilies'|@translate}"></a>
    3030
    3131  <ul id="smiliesdiv">
    3232    <li><table><tr>{strip}
    3333    {foreach from=$smiliesfiles item=smileyfile}
    34       <td><a href="{$smileyfile.TITLE}"><img src="{$smileyfile.PATH}"/></a></td>
     34      <td><a href="{$smileyfile.TITLE}"><img src="{$ROOT_URL}{$smileyfile.PATH}"/></a></td>
    3535      {$smileyfile.TR}
    3636    {/foreach}
Note: See TracChangeset for help on using the changeset viewer.