1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RM 1.1 small issue with editing resource_list_item via TM

Discussion in 'Resource Manager Support' started by TBDragon, Mar 23, 2014.

  1. TBDragon

    TBDragon Active Member

    hi how r u

    2day i was editing small thing in the resource_list_item
    and i say ok let me make TM so i dont edit the whole template and then cause some issues later

    but when i save the TM it give me ( 0/1/0) and its not applied at all on the forum =(

    i need to do 2 modifications

    so i make 2 new TM

    search for

    HTML:
    
            <dl class="resourceUpdated"><dt>{xen:phrase updated}:</dt> <dd><a href="{xen:link resources/updates, $resource}" class="concealed"><xen:datetime time="{$resource.last_update}" /></a></dd></dl>
    
    
    
    replace with

    HTML:
            <xen:if is="{$showCategoryTitle}"><dt>قسم الدراما</dt> <dd><a href="{xen:link resources/categories, $resource}">هنا</a></dd></xen:if>
    

    second modification is

    searching for

    HTML:
    <div class="resourceDetails muted"><xen:username user="{$resource}" />,
             <a href="{xen:link resources, $resource}" class="faint"><xen:datetime time="{$resource.resource_date}" /></a><xen:comment>
             </xen:comment><xen:if is="{$showCategoryTitle}">, <a href="{xen:link resources/categories, $resource}">{$resource.category_title}</a></xen:if>
           </div>
    
    replace with

    HTML:
          <xen:comment>
           <div class="resourceDetails muted"><xen:username user="{$resource}" />,
             <a href="{xen:link resources, $resource}" class="faint"><xen:datetime time="{$resource.resource_date}" /></a>
             <xen:if is="{$showCategoryTitle}">, <a href="{xen:link resources/categories, $resource}">{$resource.category_title}</a></xen:if>
           </div>
           </xen:comment>
    
    but its not applied so how i can solve this

    cuz now i use the template it self so after while i need to change the whole code and will have some problems when upgrading


    and sorry for bad explanation


    thanks ..
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Use a regular expression:

    Code:
    /<div class="resourceDetails muted">(.*?)<\/div>/is
    Replace with:
    Code:
    <xen:comment>$0</xen:comment>
     
    TBDragon likes this.
  3. TBDragon

    TBDragon Active Member

    same it didnt applied =(
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Sorry, you need to escape the backslash in the replacement:
    Code:
    <xen:comment>$0<\/xen:comment>
     
    TBDragon likes this.
  5. TBDragon

    TBDragon Active Member

    ok now its work
     

Share This Page