HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Comcode Tag Assistant

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#105468 (In Topic #20567)
Avatar

Well-settled

Deploying "sections" and "currency" tags

Greetings!

I'm currently most of the way towards completing a tutorial demonstrating the use of all the Comcode Tag Assistant tags, but am running up against difficulties over getting two of them to work.

1. The "sections" tag: In my attempts to date, this outputs the expected interface for the number of sections I specify, but  only my designated default section will display its content. Clicking any of the other section captions - or the "previous" and "next" - produces no effect at all. And if I don't specify a default section, then none of the sections' content gets displayed. My guess is there's a bug in the tag's code here.

2. The "currency" tag: The only outputted conversion value I've managed to get is "£0.00 GBP". Frankly I can't tell whether or not this is due to me not understanding the instructions regarding what values to enter in the Tag Assistant fields - which don't seem sufficient. For the "param" field, what format for representing the amount's currency should be used as the param value? It would be really helpful here to have a drop-down list to from which to choose the value - which would obviously input it in its required format. I'm also left guessing that the param value refers to the currency that is to be converted, and the result of the conversion is limited to GBP only. The "tag contents" field's description is also unclear: should the amount be specified with or without a currency symbol? A working example in the tag's general description area would be really valuable, too, I think (though my tutorial would provide one in any case).

If anyone can help me with the above, I'd be really grateful!

Thanks for reading!
Back to the top
 
Important!
Posted
Rating:
#105470
Avatar

Automated fix message

RichT said

Greetings!

I'm currently most of the way towards completing a tutorial demonstrating the use of all the Comcode Tag Assistant tags, but am running up against difficulties over getting two of them to work.

1. The "sections" tag: In my attempts to date, this outputs the expected interface for the number of sections I specify, but  only my designated default section will display its content. Clicking any of the other section captions - or the "previous" and "next" - produces no effect at all. And if I don't specify a default section, then none of the sections' content gets displayed. My guess is there's a bug in the tag's code here.

2. The "currency" tag: The only outputted conversion value I've managed to get is "£0.00 GBP". Frankly I can't tell whether or not this is due to me not understanding the instructions regarding what values to enter in the Tag Assistant fields - which don't seem sufficient. For the "param" field, what format for representing the amount's currency should be used as the param value? It would be really helpful here to have a drop-down list to from which to choose the value - which would obviously input it in its required format. I'm also left guessing that the param value refers to the currency that is to be converted, and the result of the conversion is limited to GBP only. The "tag contents" field's description is also unclear: should the amount be specified with or without a currency symbol? A working example in the tag's general description area would be really valuable, too, I think (though my tutorial would provide one in any case).

If anyone can help me with the above, I'd be really grateful!

Thanks for reading!
This issue has been filed on the tracker as issue #1732, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Rating:
#105473
Avatar

Well-settled

Hearty thanks for these, Chris!

The "sections" tag is working fine, and does just what I'd been envisioning. It'll be ideal for several of the contexts I'm currently immersed in - great to have it to hand now.

Obviously the "currency" tag is a major asset and headache-remover for e-commerce products-catalogues. Your work on the Assistant interface for it makes a world of difference to its usability and friendliness. In the light of your added info as to how its target currency is identified, though, I'm intrigued, Chris, to know how it's possible to establish its conversions are getting displayed as expected to users in foreign locations! My own hunch as to that - that, being located in the UK I'd see an amount I'd entered in, say USD, converted to its GBP equivalent - evidently isn't correct, since the output I see is my unconverted USD amount and currency. However, that result might make perfect sense to you as the tag's programmer! Anyway, I'll assume all's well - unless of course my result suggests to you otherwise...

Many thanks again - it's good being able to report progress on the tutorial!

Kind regards,

Richard.
Back to the top
 
Posted
Rating:
#105474
Avatar

You may need to install geolocation data. Go to stats in the Admin Zone, and you'll see an icon to do it. Will document this need.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105497
Avatar

Well-settled

Thanks for the last tip, Chris - indeed I hadn't installed the geolocation data - though that hasn't affected the result of my conjectured test,  (I also attempted it in the text editor for this post, and got the identical result, btw) - so I'm assuming the test itself isn't valid. 

Back to the top
 
Posted
Rating:
#105511
Avatar

I just ran some tests on your IP, and it worked right for me (showing GBP via IP-detection). However, if you are not using your public IP somehow, that could be a cause.

For example:
  • If you are on a server with a reverse proxy (e.g. cloudflare) in front of it, and IP addresses coming through to ocPortal are that of a proxy
  • If you are testing on a local install and thus your IP is a generic local one rather than a geolocatable one.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105539
Avatar

Well-settled

Thanks, Chris, and especially for taking the time to test against my IP. That clearly shows the tag is working as expected. Great to know.

I'd been wondering if perhaps my test was failing on account of my own IP getting filtered out, as per results for site stats. Does that apply in this context?

A propos of your info concerning use of Cloudflare etc. - which I'm considering doing - if I were to use such a service, would that generally alter the tag's displayed output (i.e for viewers worldwide), or, say, just for UK viewers, or have no adverse effect at all?

Thanks again, 

Richard.
Back to the top
 
Posted
Rating:
#105543
Avatar

Admin hits by default are not included in the stats, but that is unrelated.

Cloudflare would only create a problem with IP addresses if mod_cloudflare had not been correctly configured in Apache to correct the IP addresses coming through.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: