Jump to content

Community

Media System


Marcher Technologies

Recommended Posts


Hi Marcher!



I'm back again haha... D: Is there a way to include a Prev/Next Video link in the video display page? I've been looking in the database variable page and can't seem to figure out if it's possible or not.



http://community.invisionpower.com/resources/articles.html/_/ipcontent/howto-add-jump-to-previousnext-record-to-content-records-r600
... everyones meaning of previous/next differs but there lies a basis by the primary_id_field.... you can happily change it to use a different field....
or wait for the 2.3 release, which I am planning on including via the database sorting options itself and some logic shifting.
Link to comment
Share on other sites


ohhhh iam stupid :-)



so i have two another question about the "Media Display"



[indent=1]1. If i show a Video i can make a rate at the Video.[/indent]


[indent=1]I want change the "stars.png" to "stars_big.png" but i dont find the way.[/indent]



[indent=1]2. Can i also insert the Number of Rates?[/indent]



Many Thanks for your help.




#1 only where the full video is shown? or where the stars are shown already?
Same question #2.... matter of where do you mean specifically.
Would you want the stars changing to affect other applications ratings? yes/no?
Image changed by skin? again :tongue: there's options here... specific :smile: .
Link to comment
Share on other sites


#1 only where the full video is shown? or where the stars are shown already?


Same question


If i show a Video i can make a rate for it. but i think the stars are small. i have show on server and there is also stars in big format. i want use this big stars and change it in the media display



#2.... matter of where do you mean specifically.


Would you want the stars changing to affect other applications ratings? yes/no?


Image changed by skin? again :tongue: there's options here... specific :smile: .




oh now! "Display Media" i want use the stars, but i want also insert the Number of how many rates were made.

Hope you understand what i mean.....
Link to comment
Share on other sites


ok, 2nd one i have found the code.


If you need the Rating-Hits there is the Code:





Now i hope you can help me by the first Problem with the big stars



You want them replaced just here in this system on the display template correct?
use something like this:
find:


<if test="$data['database']['database_rate']">

	 <if test="!$this->memberData['member_id']">

	  {$this->lang->words['m_rating']}

	   <if test="$data['record']['rating_real'] >= 1">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 2">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 3">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 4">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 5">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><span id='rating_text' class='desc'></span>

	 <else />

	  {$this->lang->words['m_rating']}

	   <a href='#' id='user_rate_1' title='{$this->lang->words['m_rate_1']}'><if test="$data['record']['rating_real'] >= 1">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_2' title='{$this->lang->words['m_rate_2']}'><if test="$data['record']['rating_real'] >= 2">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_3' title='{$this->lang->words['m_rate_3']}'><if test="$data['record']['rating_real'] >= 3">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_4' title='{$this->lang->words['m_rate_4']}'><if test="$data['record']['rating_real'] >= 4">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_5' title='{$this->lang->words['m_rate_5']}'><if test="$data['record']['rating_real'] >= 5">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a> <span id='rating_text' class='desc'></span>

make it:


<if test="$data['database']['database_rate']">

	 <if test="!$this->memberData['member_id']">

	  {$this->lang->words['m_rating']}

	   <if test="$data['record']['rating_real'] >= 1"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if><if test="$data['record']['rating_real'] >= 2"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if><if test="$data['record']['rating_real'] >= 3"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if><if test="$data['record']['rating_real'] >= 4"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if><if test="$data['record']['rating_real'] >= 5"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else />{<img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if><span id='rating_text' class='desc'></span>

	 <else />

	  {$this->lang->words['m_rating']}

	   <a href='#' id='user_rate_1' title='{$this->lang->words['m_rate_1']}'><if test="$data['record']['rating_real'] >= 1"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if></a><a href='#' id='user_rate_2' title='{$this->lang->words['m_rate_2']}'><if test="$data['record']['rating_real'] >= 2"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if></a><a href='#' id='user_rate_3' title='{$this->lang->words['m_rate_3']}'><if test="$data['record']['rating_real'] >= 3"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if></a><a href='#' id='user_rate_4' title='{$this->lang->words['m_rate_4']}'><if test="$data['record']['rating_real'] >= 4"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if></a><a href='#' id='user_rate_5' title='{$this->lang->words['m_rate_5']}'><if test="$data['record']['rating_real'] >= 5"><img src='{parse block="ipcontent_files"}/file_on.png' alt='*' class='rate_img' /><else /><img src='{parse block="ipcontent_files"}/file_off.png' alt='-' class='rate_img' /></if></a> <span id='rating_text' class='desc'></span>


where file_off and file_on are the filenames of the image within your IPContent Media directory(/ccs_files/) By default.
If wanted by skin, you would be making 2 replacements per skin(duplicate, and put images in skin directory for /style_images/ and swapping them for that instead....
this assumes you dont actually want to change this IPB-wide, which if that is the case, edit the existing replacements for The skin set itself as described.
Edit, file_off alt fixed ='-' >.<

Edited by Marcher Technologies
Link to comment
Share on other sites


you are real good! thanks



now i have the problem, if i make the rate and there comes the hover, the stars will be small.


But i will by the hover the big stars displayed and hope you can help me also.



Greetings



already applied... basically, send the rating js some extra options:


<script type='text/javascript'>

	   rating = new ipb.rating( 'user_rate_', {

		    img_off: '{$this->settings['img_url']}/star_big_off.png',

img_on: '{$this->settings['img_url']}/star_big.png',

url: '{parse url="app=ccs&module=ajax&section=rate&id={$data['database']['database_id']}&record={$data['record']['primary_id_field']}" base="public"}&md5check=' + ipb.vars['secure_hash'],

		    cur_rating: <if test="isset($data['record']['rating_real'])">{$data['record']['rating_real']}<else />0</if>,

		    rated: null,

		    allow_rate: <if test="$data['database']['_can_rate']">1<else />0</if>,

		    show_rate_text: false

			 } );

	  </script>

Link to comment
Share on other sites

Thank you for your great help and sorry for my many questions!
But I must say that you're really good.

About the Stars i have a last question.
In this section i must also change the blue stars and i dont know where i found the code.

I have create the BLUE BIG STAR and upload to my server:

{$this->settings['img_url']}/star_rated_big.png


Where i must edit the code?

Thanks and hope you have a nice day
OT
Link to comment
Share on other sites


Thank you for your great help and sorry for my many questions!


But I must say that you're really good.



About the Stars i have a last question.


In this section i must also change the blue stars and i dont know where i found the code.



I have create the BLUE BIG STAR and upload to my server:



Where i must edit the code?



Thanks and hope you have a nice day


OT



the blue being the rated?


<script type='text/javascript'>

		   rating = new ipb.rating( 'user_rate_', {

				    img_off: '{$this->settings['img_url']}/star_big_off.png',

img_on: '{$this->settings['img_url']}/star_big.png',

img_rated:  '{$this->settings['img_url']}/star_rated_big.png',

url: '{parse url="app=ccs&module=ajax&section=rate&id={$data['database']['database_id']}&record={$data['record']['primary_id_field']}" base="public"}&md5check=' + ipb.vars['secure_hash'],

				    cur_rating: <if test="isset($data['record']['rating_real'])">{$data['record']['rating_real']}<else />0</if>,

				    rated: null,

				    allow_rate: <if test="$data['database']['_can_rate']">1<else />0</if>,

				    show_rate_text: false

						 } );

		  </script>


This is in the View Template... replace what i posted above.

Link to comment
Share on other sites


GREAT!


so now the Stars Change in the Media Display is ready! :-)



I want to display the average rating. I've already found the fields in the database. But I do not know how to specify the code.


CALCULATION:



The result will be displayed.



{$data['record']['rating_value']} / {$data['record']['rating_hits']}
Need to open the database templates variables popup... it will make things much easier for you here.
Link to comment
Share on other sites


css_media_recent_media



What is the code for the rate-hits in the template section?



Change out $data['record'] for $r... I pass the whole enchilada off as it were... everything the block itself has is present in the same format... and a bit more(.... i grab stuff lol... need some memberData not actually present in blocks)
Link to comment
Share on other sites

i am not sure, but i have insert the code in the tamplete:


$data['record']

and i become the error-message:

There is a syntax error in the template, usually caused by PHP code not properly formed. Please correct the error and hit save again.

if i insert this code, there will dont displayed:


{$data['record']['rating_hits']}

Link to comment
Share on other sites

Hello Marcher,

i have now the next question :rolleyes:

Video show in the Media System can only use a special Media Group (VIP-Member).

Current, if a Guest will show a Video, there comes on the Error-Page with follow message:

[#10CCS29] You do not have permission to view Videos in this database.



Two options for change:
1. If a guest wants to see a video, he is instantly redirected to the login page.
or
2. I change this particular error page and add all the information there.

What do you say?
Link to comment
Share on other sites


Hello Marcher,



i have now the next question :rolleyes:



Video show in the Media System can only use a special Media Group (VIP-Member).



Current, if a Guest will show a Video, there comes on the Error-Page with follow message:





Two options for change:


1. If a guest wants to see a video, he is instantly redirected to the login page.


or


2. I change this particular error page and add all the information there.



What do you say?



options :sorcerer:
use IPC's function for defining an error page, add the info there, or do one better and redirect them with $this->registry->output->silentRedirect($this->registry->output->buildUrl('app=core&module=global&section=login'));
on a PHP page for #1.. your choice.
post-201612-0-26185800-1331919843_thumb.
You are gonna want to fill in a page(after making it) on the third option there at ACP->Other Apps->IP.Content->Settings->Basic Settings.
Link to comment
Share on other sites

Its work very fine with the code. creat!

i have a another question about a block in the Media System!
I have creat a block and will displayed in this block the Member_Ranking_Image

I have use this code, but he dont work in the block of the Media System Site:


  <if test="rankimage:|:$author['member_rank_img']">

   <li class='group_icon'>

   <if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">

	<img src='{$author['member_rank_img']}' alt='' />

   <else />

	{$author['member_rank_img']}

   </if>

   </li>

  </if>



i think the autor in the code is wrong

Link to comment
Share on other sites

I installed this application for IP Content and I have some questions (I do not know if someone also asked in this topic, but maybe not!). So, in the installation instructions, MT says this:



Step 6-3: Final Database Setup



Now Visit the "Databases" page and click the pencil edit option.


On the "Options" Tab [size=5][color=#FF0000]ensure the title field is set to Video Title[/color][/size], the Content Field is Set to Description, and The Language config is acceptable(media/Media if English) save.


Add an IPContent Page from the "Page Manager"Other Apps tab -> IP.Content -> Page Manager, configure the title and meta to your desire, choose to use the provided "Media Page Template" as the template to start with.


In the Page content pane, enter {parse database="KEY"}, where KEY is the key of the database you just made.



Now, analyze text highlighted in red. Is not it a mistake? Instead the word 'Video Title' should 'Media Title'?

The system works with .swf video files?

I'll come back with a question. Now try to make the system work.
Link to comment
Share on other sites


I installed this application for IP Content and I have some questions (I do not know if someone also asked in this topic, but maybe not!). So, in the installation instructions, MT says this:





Now, analyze text highlighted in red. Is not it a mistake? Instead the word 'Video Title' should 'Media Title'?



It is a typo from when I revamped the read-me/purpose...
Basically, the issue is that on a fresh install, the field title would be Video Title... and until a recent version allowing IPB media tags en-masse, it was simply some video types beyond the Media Demo.... Im rewriting it all anyway for 2.3 as stated previously in this topic to return the pre-parsed media tag as the field value... and some neat block templates.
Link to comment
Share on other sites

Sorry, but I don't understand something. Two days ago I downloaded the application. So, of your words, I understand the application you created enter conflict with template tags Media demo (from default installation of IP Content)? Right now, I set the application and something does not work!

MT, please, check your inbox. I want to watch the printscreen's sent and tell me if I set-up the database better.

In the video.html page I use:

{parse database="video"}



???

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy