Nested Placeholders? useful & easy!
imagine a Moneysite with different topics & the following urls we want to submit.
%spinfolder-c:\gsa\articles%url_path%%
=> with the above expression an article is chosen from the according folder, depeding on the url SER is submitting at this moment.
and it's probably only a few lines of programming code to make it possible.
- www.moneysite.com/shoes.html
- www.moneysite.com/shirts.html
%spinfolder-c:\gsa\articles%url_path%%
=> with the above expression an article is chosen from the according folder, depeding on the url SER is submitting at this moment.
- %spinfolder-c:\gsa\articles/shoes.html% or %spinfolder-c:\gsa\articles/shirts.html%
and it's probably only a few lines of programming code to make it possible.
Comments
{spinfolder-c:\gsa\articles{url_path}}
it would be really great if you could implement this because it would save so much time and have benefits SEO wise.
this would do the job (PHP)
========================================
$nested = "{spinfolder-c:\gsa\articles{url_path}}";
echo Spin ($nested);
/*==========================================*/
function Spin ($str){
$isfinished = false;
do {
$str = regex ($str, $isfinished);
} while (! $isfinished);
return $str;
}
/*==========================================*/
function regex($str, &$isfinished){
preg_match("/{[^{}]*?}/", $str, $match);
if (!$match[0]){ $isfinished = true; return $str; }
$tmp_result = EVALUATE_PLACEHOLDER ($match[0]);
$new_str = preg_replace("/[{}]/", "", $tmp_result);
return $str = str_replace($match[0], $new_str, $str);
}
/*==========================================*/
function EVALUATE_PLACEHOLDER ($str){ // e.g. %url% gets the url being submitted
return '('. strtoupper ($str) .')'; // <- for testing
}
how about the optional syntax (( )) like ((spinfolder-c:\gsa\articles((url_path)) ))
i think the main advantage would be that you can create really relevant backlinks to all of your pages within a moneysite in 1 single project (plus tiers).
to simplify you could also restrict this option to some placeholders like spinfolder, spinfile, etc.
to simplify more you could even only allow it if it is not with surrounding text like in articles, etc.
and in SER you could write %spinfolder-C:/dropbox/www.moneysite.com$url_path$/titles/%
that's the theory
hope that sven can do it for "spinfolder & spinfile" commands where you can include %url_path% & %url_domain% & %anchor_text%
Even better ...
if @sven would add new placeholders %url_2filename% & %urldomain_2filename% that strip the characters / \:?| from the url being submitted then you could even do this:
VPS/PC folders:
C:/dropbox/wwwDOMAIN1comshoes.html/articles/
C:/dropbox/wwwDOMAIN2comdogtraining.html/articles/
in SER: %spinfolder-C:/dropbox/$url_2filename$/articles/%
That would make it easy to create relevant backlinks for multiple domains in one project.
Advantage:
if your Tier1 consists of 30 blogs with high quality content and 10 posts per blog and each blogpost pursues a different keyword => then you could build very relevant Tier2 backlinks to each blogpost in only 1 project instead of 300. you would still have to create the data (articles/ titles/ images/ anchors/..) for each blogpost, but if you have a way to automate this you will have a treasure in your hands. if you dont have a way to automate you could use %spinfolder-C:/dropbox/$urldomain_2filename$/articles/% in SER and just create data for the 30 blogs instead for each blogpost.
URL: http:// www.domain.com/shirts.html
on PC: c:\gsa\shirts.html\articles$
in GUI: $spinfolder-c:\gsa%url_path%\articles$
what i said in the previous post about totally new placeholders is obsolete because this could be easily done with available placeholders %url% & %anchor_text% within $spinfolder$ ... if sven makes sure that unwanted characters from e.g. %url% -result are stripped to make it useful for accessing folders (with articles/titles/etc.) that have names of urls or anchors.