CybTekSol Posted February 16, 2009 Report Share Posted February 16, 2009 Checkout the power and flexibility of Ketarin's 'placeholder' feature in the latest templates posted by FranciscoR and myself. I believe this is ONLY the BEGINNING as I have faith that Flo has a few more tricks up his sleeve for future versions. Possibly 'variables embedded within variables' or IF, THEN, ELSE capability Flo? You up for it? Link to comment Share on other sites More sharing options...
floele Posted February 16, 2009 Report Share Posted February 16, 2009 Eeeh...rather not :-p Link to comment Share on other sites More sharing options...
CybTekSol Posted February 16, 2009 Author Report Share Posted February 16, 2009 Eeeh...rather not :-p Well... one can wish... Link to comment Share on other sites More sharing options...
FranciscoR Posted February 16, 2009 Report Share Posted February 16, 2009 (edited) Possibly 'variables embedded within variables' or IF, THEN, ELSE capability Flo? That's also an old dream of myne. =D One aditional feature I think it's lacking is the hability to extract selected data from placeholders, e.g., you I insert an URL (or something) like hxxp://www.versiontracker.com/php/dlpage.php?id=9679&db=win&pid=10008952&kind=&lnk=http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe And apply regex to use only the required part of adress: hxxp%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe Not only that, it would be nice to have the ability to create a replacement string (=final url in example) hxxp://www.jam-software.com/treesize/TreeSizeProfessional-Demo.exe Or assuming I would like to extract PID, I would use regex to capture only 10008952 So this would be an easy way to "export" PID to other variables. =) Edited February 16, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
Stalker Posted February 16, 2009 Report Share Posted February 16, 2009 I still dream of being able to scrape {appname} from the URL on template instantiation... Link to comment Share on other sites More sharing options...
FranciscoR Posted February 16, 2009 Report Share Posted February 16, 2009 I still dream of being able to scrape {appname} from the URL on template instantiation... That's another one of my dreams. Link to comment Share on other sites More sharing options...
floele Posted February 16, 2009 Report Share Posted February 16, 2009 What extactly do you want to do with {appname}? I don't quite understand yet. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 16, 2009 Report Share Posted February 16, 2009 I'll let Stalker explain what he means. How about my idea, am I dreaming... ? I do like feedback. =) Link to comment Share on other sites More sharing options...
floele Posted February 16, 2009 Report Share Posted February 16, 2009 Not sure, sounds too complicated at the moment. Or would you think that a single addirional "regex" attribute for each place holder would suffice for what you want to do? Link to comment Share on other sites More sharing options...
FranciscoR Posted February 16, 2009 Report Share Posted February 16, 2009 Yes, that would be most handy. But where would we insert regex then ? What I have thought for the "replacement string" is a classical search and replace feature, also with regular expressions (no ?), that could be located under the "Textual Content" tab. We could split the "Textual Content" tab into something like: 1. Input: 2. Search: 3. Replace: 4. Output: And I would use Output to serve all other variables. =) Link to comment Share on other sites More sharing options...
floele Posted February 16, 2009 Report Share Posted February 16, 2009 Erm...why? There already is a function "replace". Link to comment Share on other sites More sharing options...
FranciscoR Posted February 16, 2009 Report Share Posted February 16, 2009 (edited) Agreed, I just haven't use it like that !!! But now that you mention it, and I was looking at available functions again, I think I can achieve the above results (I will do some testing) with trimend/trimstart/split. Maybe that additional "regex" attribute is not needed after all? Thanks anyway ! Edited February 16, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
Stalker Posted February 16, 2009 Report Share Posted February 16, 2009 What extactly do you want to do with {appname}? I don't quite understand yet. Like I said in this thread I want a resolve-me-once variable which will retrieve an application name and fill the appropriate field only once when I add the application using that template. That variable will only be resolved once and after the app entry was create it can be auto-deleted. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 17, 2009 Report Share Posted February 17, 2009 (edited) Indeed it works: 17-02-2009 00:05:31: Update started with 1 application(s) 17-02-2009 00:05:31: aaa: Replacing {app} in '{app:split:=:5}' with 'http://www.versiontracker.com/php/dlpage.php?id=9679&db=win&pid=10008952&kind=&lnk=http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe' 17-02-2009 00:05:31: aaa: Replacing {app2} in '{app2:replace:%2F:/}' with 'http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe' 17-02-2009 00:05:31: aaa: Replacing {app3} in 'http:{app3:replace:http%3A:}' with 'http%3A//www.jam-software.com/treesize/TreeSizeProfessional-Demo.exe' 17-02-2009 00:05:32: aaa: Checking if update is required... 17-02-2009 00:05:32: aaa: Update required, 'D:\Programas\Test\TreeSizeProfessional-Demo.exe' does not yet exist 17-02-2009 00:05:32: aaa: Replacing {app} in '{app:split:=:1}' with 'http://www.versiontracker.com/php/dlpage.php?id=9679&db=win&pid=10008952&kind=&lnk=http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe' 17-02-2009 00:05:32: aaa: Replacing {id} in '{id:split:&:0}' with '9679&db' 17-02-2009 00:05:32: aaa: Replacing {id1} in 'http://www.versiontracker.com/dyn/moreinfo/win/{id1}' with '9679' 17-02-2009 00:05:34: aaa: Replacing {version} in '{version}' with '5.1.2' 17-02-2009 00:05:34: Update finished But this involves a certain amount of work (7 variables to solve example), how about a regex function ? =D For templates we always need wildcards... Edited February 17, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
CybTekSol Posted February 17, 2009 Author Report Share Posted February 17, 2009 We're up for anything your mind can conceive that will add more advanced functions for difficult downloads and at the same time simplify the process for the user... essentially in the same legacy that Ketarin has already established Flo. No pressure from me... take your time! Link to comment Share on other sites More sharing options...
floele Posted February 17, 2009 Report Share Posted February 17, 2009 Hm...ok. We'll see Link to comment Share on other sites More sharing options...
FranciscoR Posted February 17, 2009 Report Share Posted February 17, 2009 I think a regex function is much, much needed, especially if you're working in sites that provide several DL URLs in each page (and you insert a DL URL in placeholder (like my Ghisler template)). I am now working in another similar template, and if I would use the above procedure, *just* to get {version}, I would have to use *15* functions/variables, and we are talking of a universe of 30 files, no more. Now imagine how many functions you will have to use in sites with thousands of files, hundreds of functions... when, in fact, you need only *1* regex to bypass all that naming convention complication... Link to comment Share on other sites More sharing options...
floele Posted February 17, 2009 Report Share Posted February 17, 2009 Regex function? Why not. Seems simple enough to do Link to comment Share on other sites More sharing options...
FranciscoR Posted February 17, 2009 Report Share Posted February 17, 2009 If it was simple I would do it myself. I know it's complicated, that's why I asked you. =D You can do it. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 18, 2009 Report Share Posted February 18, 2009 Flo, Are you serious ? Is THAT complicated ? The alternative I can think of, that will produce the same result, is to insert a "Use Regular Expression" field in the Textual Content Tab (which is almost always empty)... the advantage over a regex function is clear, you can SEE what you're matching... in the end, the Textual Content Tab will look like the "Content from URL (Regular Expression)" Tab... does this make it easier ? I see some copy-paste possibility here... maybe this will help ? We certainly don't need anything THAT complicated. Link to comment Share on other sites More sharing options...
floele Posted February 18, 2009 Report Share Posted February 18, 2009 Who said that it's complicated? Link to comment Share on other sites More sharing options...
FranciscoR Posted February 18, 2009 Report Share Posted February 18, 2009 No worries then. =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now