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.


'Language' question...

Login / Search

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

Community saint

Just curious about how ocPortal uses language files.  I was fiddling with my galleries, slowly working on getting the 'look' as I wanted it.   In the list of galleries, for any given user it said "Personal Gallery of username'.  I just wanted it to say 'usernames's Gallery'.

This was a big learning curve.  All the way into a function that pulls the text out of the translate table.  Heck, how did it get there?   The theory/concept behind having language files, AND putting all that into a database to look up, escapes me.  If anyone knows how this works so it is a bit more simple to sort through next time a small text change needs to be made, it would be much appriciated.

In all that, as a bit of side tracking, I learned of the function _get_where_extend (or something like that).  I couldn't figure out how you could pass down to it, a 'WHERE' that would be a non-equal statment.  Seems it's either =NULL or = something.

Paul
Busy exploding my brain with code.  :thumbs:

Paul
Back to the top
 
Posted
Rating:
#78067
Avatar

Community saint

galleries.ini >> against 'PERSONAL_GALLERY_OF=' change the language file to whatever you want it to read …

 :thumbs:


The 'function_get_where_extend' thingy. No idea. Not an area I wander into with my eyes open!

bummer

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#78068
Avatar

Community saint

Fletch said

galleries.ini >> against 'PERSONAL_GALLERY_OF=' change the language file to whatever you want it to read …

It would seem that easy.  But it is a bit more than that.  Because that bit of language is used and stored in the translations database.  So if users already have a gallery, it will still use the old form of 'PERSONAL_GALLERY_OF… unless you go into the translations db and edit them.

Paul
Back to the top
 
Posted
Rating:
#78087
Avatar

Yes. Personal galleries get saved and the regular title field is used after that point. But you can go back and edit old ones via the normal edit gallery screen(s) if you wish.

_get_where_extend is used internally (anything starting with an underscore probably isn't useful).
It's used by query_select/query_delete/query_update which are nice functions to avoid you having to write SQL.


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
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: