Jump to content

Recommended Posts

I'm using a php video-sharing site script. Currently when you select a thumbnail, to view a video, a page pops-up in a pop-up box showing a message. Someone added code, to change it so that just a pop-up message box appears (rather than the page-pop-up), called Custom Message Block, but the page still appears, instead of the Custom Message Block.

 

Can you help me figure out how I can make this so the Custom Message Block appears, rather than the (inner_purchase) page? Thanks. Any help or suggestions will be appreciated.

 

<!--Begin Left Column-->
<div id="column-left-2">
<br />
  <!--Begin Whats Showing Menu-->
  <div class="header-narrow"><h3>[var.get_type]</h3></div>
    <div class="whats-showing">
   </div>
   <div class="container-narrow-bottom"></div><!--End Whats Showing Menu-->
   <br />

</div><!--End Left Column-->

<!--Begin Right Column-->
<div id="column-right-2">

  <!--Begin Video Search List-->
  <div style="height: 2px;"> </div>

  <span style="margin-bottom: 12px;" class="font5_15">
    "[var.keyword]"  [var.get_type_word] [var.lang_search] [var.results_show] - [var.results_of] of [var.total_records] [var.lang_results] <br />
     <form id="buyVideo" name="buyVideo" method="post" action="buy-video.php">
       <!--input type="submit" name="purchase" value="Continue" style="margin:7px 0" rel="gb_page_center[600, 435] "-->
       <input type="submit" name="purchase" value="Use Credits Now" style="margin:7px 0" rel="gb_page_center[600, 435] ">
       <input type="button" name="search" value="Search Again" onclick="window.location.href='page.php?page=9';" style="margin:7px 0">
       <input type="button" name="search" value="Purchase Credits" onclick="window.location.href='credits.php';" style="margin:7px 0">
       <input type="hidden" name="keyword" value="[var.keywords2]">
       <input type="hidden" name="submitted" value="yes">
       <input type="hidden" name="ttl" value="[var.total_price]">
       <input type="hidden" name="user_id" value="[var.user_id]">
       <input type="hidden" name="credits" value="[var.member_credits]">
       <input type="hidden" name="id[]" value="[blkfeatured2.indexer;block=input]"></input>

  </span>
<br><!-- Check All Box by DizzyD -->
     <input type="checkbox" name="checkall" onclick='checkedAll()'> Select All<br>
<!-- end checkbox mod -->
  <!-- ******************************** START OF CUSTOM MESSAGE BLOCK ******************************* -JG -->
  <script>
    function doCreditCheck()
    {
      // The custom message block only appears when the PAY/SEARCH buttons are present.
      // The presence of those buttons indicates that you need to pay before viewing the video.
      document.getElementById('popupBuyMsg').style.display = 'block';
      // We return false so that the href associated with this object is ignored.
      return false;
    }
  </script>
  <style>
    .buymsg      { display:none; position:absolute; top:300px; left:300px; width:350px; background-color:#eeeeff; border-style:solid; border-width:1px; padding:15px 20px 5px 20px; }
    .buymsgclose { text-decoration:none; font-size:0.9em; font-variant:small-caps; margin-top:10px; }
  </style>
  <!-- Hidden message block to replace inner_purchase.htm when only a GreyBox message is being displayed. -->
  <div id="popupBuyMsg" class="buymsg">
     You must use "credits" to view this video.<br>
     You have <strong>[var.member_credits]</strong> credits in your account.<br>
     <br />
      To view this video select "Use Credits Now".<br>
      To purchase credits select "Purchase Credits".<br>
      Or Search Again.
     <div style="width:100%; text-align:right;">
       <a class="buymsgclose" href="#" onclick="document.getElementById('popupBuyMsg').style.display = 'none'; return false;">Close Window</a>
     </div>
  </div>
  <!-- ********************************** END OF CUSTOM MESSAGE BLOCK ********************************** -->

  <div id="content-list">
    <ul class="content-list-thumb" style="margin-top: 13px;">
      <span style="margin-left: 1px;"><input type="checkbox" name="checkedBoxs[]" value="[blkfeatured.indexer;block=div]"></span><br /> <br />

      <!-- Add an onclick feature that first checks to see if you need to use purchase credits. -JG -->
      <li><a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li>
      <!--li><a onclick="return doCreditCheck();" href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li-->
    </ul>
    <ul class="content-list-info">
      <li><h4><span style="color: #800000;">[var.lang_title]:</span>  <a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435] "><!--[blkfeatured.title;htmlconv=no;block=div;ope=max:70;comm]--></a></h4></li>
      <!--<li><b>[var.lang_description]: </b><!--[blkfeatured.description;htmlconv=no;block=div;ope=max:68;comm]--></li>-->

      </li>
      <li><!--<span class="font4_12">[var.lang_tags]: </span>--></li>
      <li><!--<b>[var.lang_comments] - [var.lang_responses]: </b>--><!--(<!--[blkfeatured.comments;block=div;ope=max:80;comm]-->)--></li>
    </ul>
[onload;block=div;when [var.type_videos]=1;]
  </div>
  <!--End Video Search-->

  <!-- Pagination start -->
  <div align="center">
    <div id="pagination">
      <li> </li>
      <ul>[var.show_pages;htmlconv=no]</ul>
    </div>
  </div>
  <!-- Pagination end -->
</div><!--End Right Column-->
</form>

Link to comment
https://forums.phpfreaks.com/topic/173731-help-with-message-pop-up/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.