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.


member content preview or teaser

Login / Search

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

Fan in action

is there a way to display a preview or teaser of member content

I have gone back glancing through the tutorials and cannot find this answered and I thought I even maybe asked it before in the forum but am not finding it if I did.

On ocPoral based websites with both public and private (member only) content is there a way to show a small portion of the content to none members, like the first x characters? Off hand I am thinking this would only apply to things like the comcode pages, blog posts, and newsletters and not the forums as I think you separately control view, post, etc. for the forums although maybe the same concept could be applied there.

Currently I am kind of accomplishing it by doing news posts about member content but it would be easier if anytime I created member content I could click on an option to show a teaser to non-members.

It may be there and I am just missing it or there may be some command code to just drop into the content but I do not remember running across any information on it.

Already there and easy to do? I would appreciate someone educating me on it.
Not there? Is this something others see as being useful?

Thanks for any clarification.
Back to the top
 
Posted
Rating:
#79875
Avatar

Community saint

I am not experienced enough to know if there are back end options built into the system for this or not but I think you could accomplish the same effect using Tempcode. I would read the tutorials on Tempcode programming and see if they guide you in the right direction.
Back to the top
 
Posted
Rating:
#79907
Avatar

Community saint

While you can certainly do user type conditional coding with Tempcode, you are unlikely to be able to do too much with just Tempcode. You would almost certainly need to edit php code as well.

iamageneralist said

it would be easier if anytime I created member content I could click on an option to show a teaser to non-members.
This would need to be done with custom php code.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#79908
Avatar

Can be done in Tempcode…

Code

{+START,IF,{$NOT,{$IS_IN_GROUP,10,11,12}}}
   {CONTENT}
{+END}

{+START,IF,{$IS_IN_GROUP,10,11,12}}
   {$TRUNCATE_LEFT,{CONTENT},100,0,1}
{+END}

where '{CONTENT}' is actually whatever output variable was already in the template and '10', '11' and '12' are usergroup IDs you want to permit to see it all.


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:
#79909
Avatar

Community saint

Happy to be corrected Chris, but I don't recall seeing much in the way of user checking in the templates Tempcode, so I assumed that it was being handled primarily in the php code.

So the primary user checking is at the page level, and not in the template code, correct?

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#79910
Avatar

Yeah, clearly if this was something designed as an ocPortal feature hard-coding usergroup IDs would be a big no-no. It's just we allow a lot of customisation at the template layer if people want to do it so you don't need to get into the PHP in most cases.


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:
#79911
Avatar

Community saint

The flexibility is in the right place, so the design is great :thumbs:  .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: