Keyword

to see video in the K2 user's pages

  • SImone
  • SImone's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 months ago #136646 by SImone
to see video in the K2 user's pages was created by SImone
Hello everyone, I'm trying, if it exists, how to view the video on the user's page; i try to explain better.
I have a particular situation, in which many k2 users publish not only texts but also many movies connected mainly on youtube.
When I go to the user's page of a user of K2 and I view the list of his posts I would like to see in addition to the introductory text, also the video palyer for video that has published, which instead seem possible to see only in the article's details page.

At this url you can see what I mean: the user "nautical channel" have published movies on youtube (or vimeo) and in the list of his posts I see only the introductory text and the link "see more", if I go to read it all, I find the video player but I need to see already in the list of posts.

http://127.0.0.1/giancarlo/it/press/itemlist/user/632-nauticalchannel

thank you

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #140199 by Krikor Boghossian
Replied by Krikor Boghossian on topic to see video in the K2 user's pages
Hello,
The video element by default is not present in the user's pages.

It is possible to override the user.php file and place this snippet where you want it to appear.
<?php if(isset($item->video)): ?>
			<?php $video = JHtml::_('content.prepare', $item->video); ?>
			<div class="catItemVideoBlock">
				<?php echo $video; ?>
			</div>
			<?php endif; ?>

More on overriding can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • SImone
  • SImone's Avatar Topic Author
  • Offline
  • New Member
More
9 years 1 month ago #140216 by SImone
Replied by SImone on topic to see video in the K2 user's pages
hi thank's for your interest to my problem.
I tried to follow your indications, but i think that i don't find the right file.
I tried to modify the file mystite/components/com_k2/templates/user.php but there are no change.
I think i've taken the wrong file.

The page that i would like to modify is this

www.giancarlopedote.it/2014/it/?option=com_k2&view=itemlist&task=user&id=632:nauticalchannel&Itemid=116&lang=it

but i don't find the correct file; can you tell me where i can find it?

Thankyou

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #140229 by Krikor Boghossian
Replied by Krikor Boghossian on topic to see video in the K2 user's pages
Please read the post which I linked.
I has the correct path to the user.php file.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum