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

Fixed TMC Usage

MattW

Well-known member
#1
I'm just testing out some of the TMS edits I have on my live site and moving them over to TMC.

I can't get them to work though :confused:

Do they need to be associated with an add-on?

The example I'm currently working on:

file - footer.css
find:
Code:
.footerLinks a.globalFeed
            {
                width: 14px;
                height: 14px;
                display: block;
                text-indent: -9999px;
                white-space: nowrap;
                background: url('@imagePath/xenforo/xenforo-ui-sprite.png') no-repeat -112px -16px;
                padding: 0;
                margin: 5px;
            }
Replace
Code:
.footerLinks a.globalFeed
            {
                width: 16px;
                height: 16px;
                display: block;
                text-indent: -9999px;
                white-space: nowrap;
                background: url('http://cdn.z22se.com/xenforo/icons/rss_sat_blue.png');
                padding: 0;
                margin: 5px;
            }
All I'm doing is swapping the RSS icon for my own blue one.

Testing doesn't do anything.

I've done a TMC edit for my AttachmentStats add-on, and that works OK, but anything else I try just isn't working??
 

Attachments

Mike

XenForo developer
Staff member
#2
I'll probably need to tweak the search code -- @imagePath isn't what's actually in the template ({xen:property imagePath}).
 

MattW

Well-known member
#3
Thanks @Mike
Just tried another one, which isn't working either

Template
post

Find
<span class="authorEnd"><xen:username user="$post" class="author" />,</span>

Replace
<i class="icon-info-sign icon-large icon-fixed-width" style="padding-right:4px;"></i>$0

(using $0 makes no difference)

EDIT: Actually, testing didn't show any differences, but after saving it, it's applied and working
 

MattW

Well-known member
#4
Thanks @Mike
Just tried another one, which isn't working either

Template
post

Find
<span class="authorEnd"><xen:username user="$post" class="author" />,</span>

Replace
<i class="icon-info-sign icon-large icon-fixed-width" style="padding-right:4px;"></i>$0

(using $0 makes no difference)

EDIT: Actually, testing didn't show any differences, but after saving it, it's applied and working
Actually, I get a strange result when using $0 in the replacement string

http://dev.z22se.com/xenforo/threads/test.66/#post-122

If you hover over any of the post bits, it's almost as though it's loading a none existent image in them all.

If I use the full string, it doesn't do that.
 

Mike

XenForo developer
Staff member
#5
There's a potential issue with the test results being cached, so if the first test failed, the remaining ones wouldn't update.
 

Mike

XenForo developer
Staff member
#11
You can now use the @property shortcut in the search value, provided you're just doing a simple replacement. If you're using a regular expression, you'll need to use the {xen:property} version.