9 posts by 4 authors in: Forums > CMS Builder
Last Post: July 4   (RSS)

Hello, on the list of placeholders I can see $currentuser.fullname$ and $currentuser.num$ as the users who edited for the last time an article. So, if user ABC creates an article but some time later user XYZ edits the same article, $currentuser.fullname$ and $currentuser.num$ will change from ABC to XYZ.

What placeholder should I use to ALLWAYS KEEP the original user's fullname and num?

Thank you

Sven Sanchez
www.deguate.com

Heelo, any ideas anyone? If there's a placeholder for the "current user" there should be a placeholder for the creator of the article! I went to bed at 3 AM guessing but none of my guesses worked!

Sven Sanchez
www.deguate.com

Hi Sven,

It sounds like you're using Article Manager?  Do you have $article.author$ available as a placeholder?

Thanks,
Robin

Robin
Programmer
interactivetools.com

Hi Robin, thanks a lot for your reply. You're right, I'm still using Artman 2.1, and I already tried the $article.author$ placeholder which didn't work ([unknown placeholder $article.author$])

I created a placeholder in the accounts section named 'analytics ', what I'm trying to do is to place a different google analytics account depending on the article's author, this way I can pay my authors based on the amount of traffic their articles generate to our site.

Sven Sanchez
www.deguate.com

Hi Sven,

In the Article Manager templates, you can add this placeholder:

<!-- templatePlaceholderList -->

The templatePlaceholderList command generates a complete list of all the placeholders available for the template.

If you put it in the template footer, it will generate a list of all the placeholder and values available for that template.

Hope that helps.

---------------------------------------------------
Cheers,
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hello Damon, thank you for your reply. 

I did the <!-- templatePlaceholderList --> before searching on your forum. That is where I found the $currentuser.fullname$ and $currentuser.num$ placeholders, which unfortunately change when someone edits the article>

I created a placeholder called ANALYTICS in the accounts section, so that each editor can have a Google Analytics code added to their articles and check their performance, while I can pay them based on the number of visits they generate to our site. 

So, $currentuser.analytics$ does kind of work, but not completely:

If user A publishes an article, his Google Analytics is inserted and his visits are counted. BUT! If user B (an admin) edits the article to correct any issue, then the GA code from user A is replaced by the GA code from user B.

I am looking for the correct placeholder to use: instead of 'CURRENTUSER' it should be something like 'ORIGINALUSER'

I already tried guessing dozens of possibilities, including:

  • $user.analytics$
  • $username.analytics$
  • $createdbyuser.analytics$
  • $author.analytics$
  • etc...

Right now, I have a large If / Then statement at the end of each of my 64 templates, but I'm planning on getting new authors and I can't edit 64 templates each time I add a new person:


<!-- templateIf : $article.createdByUserNum$ eq '30' -->
<!-- Amanda Juarez -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-1');
</script>
<!-- /templateIf -->

<!-- templateIf : $article.createdByUserNum$ eq '34' -->
<!-- Bayron Garcia-->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-2');
</script>
<!-- /templateIf -->

<!-- templateIf : $article.createdByUserNum$ eq '35' -->
<!-- Oscar Estrada -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-3');
</script>
<!-- /templateIf -->

<!-- templateIf : $article.createdByUserNum$ eq '38' -->
<!-- Axel Natareno -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-4');
</script>
<!-- /templateIf -->

<!-- templateIf : $article.createdByUserNum$ eq '39' -->
<!-- Elsa Robles -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-5');
</script>
<!-- /templateIf -->

<!-- templateIf : $article.createdByUserNum$ eq '40' -->
<!-- Pablo Ordoñez -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-6');
</script>
<!-- /templateIf -->


<!-- templateIf : $article.createdByUserNum$ eq '41' -->
<!-- Ana Lucia Jimenez -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-7');
</script>
<!-- /templateIf -->


<!-- templateIf : $article.createdByUserNum$ eq '42' -->
<!-- Alex Castillo -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-8');
</script>
<!-- /templateIf -->


<!-- templateIf : $article.createdByUserNum$ eq '43' -->
<!-- Yasmin Salguero -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-9"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-xxxxxxxxx-9');
</script>
<!-- /templateIf -->

An alternative would be to be able to somehow INCLUDE the above code with a <!--#include virtual="/authors.htm" --> file able to determine which author's GA code it has to place in the page (inserting the above code and calling it via <!--#include virtual="/authors.htm" --> inserts every author's code into every page, so it counts each visit to every page as a visit to each author)

Sven Sanchez
www.deguate.com

Hi Sven, 

Unfortunately, none of us have used Article Manager in years so we're really not sure. 

It's always a challenge with old software (12 years since last update) on how much time to put into it and when to start on something new.

If you want to try CMS Builder it's a free download now.  That will be a lot of work but is a decade more modern.

Sorry, I can't be of more help! 

Dave Edis - Senior Developer
interactivetools.com

Hello Dave, thank you for your reply. I bought 2 licenses of CMS Builder when it came out (2012 I think) but had a problem with it:

My site is huge (more than 150,000 pages built with Artman) all with the extension .shtml

The new software uses the extension .php

Since I have thousands of pages already positioned in Google and other Search Engines, I can't risk losing my positioning renaming all my pages so that they use .php now

If there's a way now to convert my site to CMS Builder keeping my current filenames that would be very nice.

Sven Sanchez
www.deguate.com