From acd552d5f37ec4882f624baf8cb860c001cfdd89 Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 6 Jan 2015 06:07:48 +0100 Subject: added skin blackhole --- libtemplate/templatefunction.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libtemplate/templatefunction.c') diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 8465961..80cf762 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -1186,6 +1186,19 @@ void cTemplateFunction::ParseStringParameters(void) { break; } } + for (map < string, int >::iterator it = intTokens->begin(); it != intTokens->end(); it++) { + size_t found = path.find(it->first); + if (found != string::npos) { + updated = true; + imgPath = path; + if (found > 0 && ((it->first).size() + 2 <= imgPath.size())) { + stringstream intVal; + intVal << it->second; + imgPath.replace(found-1, (it->first).size() + 2, intVal.str()); + } + break; + } + } } } -- cgit v1.2.3