Problems, need help? Have a tip or advice? Post it here.
18 posts Page 2 of 2
1. No sir the url is not showing search.php
OK, so forget everything else and see why you are not reaching search.php despite setting it as the 'action' of the form.

Have you registered search.php as a Couch template? Make sure it is listed in admin sidebar before proceeding.

Let me know.
Sir I have registered the search.php template by visiting the url: http://localhost/folder1/folder2/search.php (as is my url right now) while being signed into Couch as Super-Admin...

Also, all my files are in folder2...

But the search.php does not appear in the admin sidebar, just as you doubted... :?:
Image
where innovation meets technology
Did you put the required
<?php require_once( 'couch/cms.php' ); ?>
and
<?php COUCH::invoke(); ?>
in the template?
I guess the pressure has built up a lot on me... i didnt use the boiler plates... Sorry for that...

Now have put those in, and have also got the template registered...

I just went out to check the search on index.php template. It is giving me the result of search as:
"No Videos Found" as the

Code: Select all
<cms:no_results>
            <h3>No videos found</h3>
      </cms:no_results>


goes into execution.

I have four posts, cloned from the video.php clonable page. yet no result.
Image
where innovation meets technology
@KK Sir,

Sir I incorporated the Voting Module given at this link http://www.couchcms.com/forum/viewtopic.php?f=5&t=8133&p=14696&hilit=vote#p14696.

I am facing a problem. As you know that the video.php template is set to clonable='1', the votes being displayed at the front end are same in all videos. Whereas at the backend, the votes are being displayed correctly.

I have used the following variables:
1. count
2. percent_up
3. percent_down

I have a feeling that these will display the total number of votes for the video.php cloned template. But, the display of the votes should be concerning to individual cloned pages.

The site has been temporarily hosted at: http://www.clickmeindia.com/demo/

Could you please throw light on the same!

Regards,
Aashish
Image
where innovation meets technology
Hi Aashish,

I'll have to take a look at your frontend code.
Can you please post it here?

Thanks.
Sir this is the code:

Code: Select all
<?php require_once( 'couch/cms.php' ); ?>

<cms:template title='Video Upload(s)' clonable='1' startcount='1' >
   <cms:editable name='video' label='Upload Video' type='file' no_xss_check='1' />
    <cms:editable name='desc' label='Video Description' type='richtext' />
    <cms:editable name='img' label='Video Thumbnail' type='image' show_preview='1' preview_width='150' />
   <cms:editable type='vote_updown' search_type='decimal' name='my_vote' label='Ratings of the Video' />
    <cms:editable
        type='datetime'
        name='expiry'
        label='Expiration Date + Time'
        allow_time='1'
        am_pm='1'
        default_time='@current'
    />   
</cms:template>

<cms:if k_is_page>
    <cms:set current_time="<cms:date format='Y-m-d H:i:s' />" />
    <cms:if current_time gt expiry >
       <cms:php>
           header('HTTP/1.0 404 Not Found');
           echo file_get_contents("404.php");
           die();
       </cms:php>
   </cms:if>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title><cms:show k_page_title /></title>
        <link type="text/css" href="css/simplegrid.css" rel="stylesheet" />
        <link type="text/css" href="css/genxcoders_stylesheet.css" rel="stylesheet" />
        <link type="text/css" href="css/pagination.css" rel="stylesheet" />
        <!-- player skin -->
         <link rel="stylesheet" type="text/css" href="css/skin/playful.css">
        <!-- Flow Player -->
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <!-- include flowplayer -->
       <script type="text/javascript" src="js/flowplayer.min.js"></script>
        <!-- Vote images -->
        <link type="text/css" href="css/like-dislike.css" rel="stylesheet" />
        <script type="text/javascript">
         $('#vote input:radio').addClass('input_hidden');
         $('#vote label').click(function() {
             $(this).addClass('selected').siblings().removeClass('selected');
         });
      </script>
        <!-- Vote images -->
   </head>

   <body>
   
       <div id="wrapper">
           <div id="header">   
             <div class="grid grid-pad">
                <div class="col-3-12">
                   <div class="content">
                      <h1><cms:get_custom_field 'title' masterpage='globals.php' /></h1>
                   </div>
                </div>
                <div class="col-9-12">
                   <div class="content">
                        <form id="k_search_form" method="get" action="<cms:link 'search.php' />" accept-charset="utf-8">
                         <input
                                        class="search"
                                      type="text"
                                      placeholder="<cms:get_custom_field 'search_box' masterpage='globals.php' />"
                                      name="s"
                                      id="s"
                                   onFocus="if (document.forms['k_search_form'].s.value === '') document.forms['k_search_form'].s.value=''"
                                   onBlur="if (document.forms['k_search_form'].s.value == '') document.forms['k_search_form'].s.value=''"
                                />
                         <input
                                       class="submit"
                                      type="submit"
                                      value="<cms:get_custom_field 'search_button' masterpage='globals.php' />"
                                  />
                                  <input type="hidden" name="nc" value="1" />
                     </form>
                   </div>
                </div>
             </div>
            </div>
           
            <div id="body-content-video">
               <!-- Video Player -->
             <div class="grid grid-pad">
                <div class="col-1-1">
                   <div class="content">
                      <div id="video-player">
                           <div class="flowplayer" data-swf="flowplayer.swf" data-ratio="0.5" style="margin-bottom: 20px;">
                              <video>
                                 <source type="video/mpg4" src="<cms:show video />" >
                                        <source type="video/H.264" src="<cms:show video />" >
                                        <source type="video/flv" src="<cms:show video />" >
                              </video>
                           </div>
                            </div>
                   </div>
                </div>
                    <!-- Video Player -->
                   
                    <!-- Title, Views and Votes-->
                    <div class="col-1-2">
                  <div class="content">
                     <h2><cms:show k_page_title /></h2>
                  </div>
               </div>
               <div class="col-1-2">
                  <div class="content">
                     <cms:form
                         masterpage=k_template_name
                         mode='edit'
                         page_id=k_page_id
                         anchor='0'
                         method='post'
                      >

                         <cms:if k_success>
                             <cms:db_persist_form
                                 my_vote=frm_vote
                             />
                             <cms:redirect k_page_link />
                         </cms:if>

                        <div style="float: left;">
                         <cms:input id='radio-demo' type='radio' name='vote' opt_values='Rate Up=1 || Rate Down=-1' />
                                </div>
                                <div style="float: left;">
                                <input class="button-rate-me" type="submit" name="submit" value="Rate this Video"/>
                        </div>
                                <div style="float: left; margin-left: 15px;">
                                   <cms:show_votes 'my_vote'>
                                       <i><b>Total Ratings: </b><cms:show count /></i><br />
                                       <i><b>Rate Up's:</b> <cms:show percent_up />% <br /> <b>Rate Down's:</b> <cms:show percent_down />%</i>
                                    </cms:show_votes>
                                </div>
                     </cms:form>
                  </div>
               </div>

             </div>
               
                <div class="grid grid-pad">
                   <div class="col-1-1">
                  <div class="content" style="margin-bottom: 30px; text-align: justify;">
                           Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
                        </div>
                    </div>
                </div>
               
            </div>
            <div style="margin-bottom: 40px;"></div>
            <div id="footer">
                   &copy; <cms:get_custom_field 'footer' masterpage='globals.php' /> | Powered By <a href="http://www.couchcms.com/" target="_blank">CouchCMS</a>
                </div>
               
         </div>
        </div>
   
   </body>
</html>
</cms:if>
<?php COUCH::invoke(); ?>
Image
where innovation meets technology
Hi Aashish,

I tested out your code and it is working just fine for me.
For that matter, I visited your site and it is working as expected there too.

What you posted is the page_view of individual video.
The problem, as seen on your site, is where you are listing all the videos (search page).
Please PM me the search template.

Thanks
18 posts Page 2 of 2