• 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

TBDragon

Active member
#1
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 ..
 

Chris D

XenForo developer
Staff member
#2
Use a regular expression:

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