Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I create a restricted area for subscribers only?


katman1971

Recommended Posts

Posted

Hi

 

I have one product: video tutorials. My homepage will have a list of video tutorials. Anyone can click and view the first two videos but the rest of the videos will not be clickable (except to subscribers). Only customers who click on "buy it now" can create a username/password and view all of the video tutorials.

 

How would I set this up? Thanks

Posted

You can "hide" things from non-registered customers like this:

 

<?php
 if ( tep_session_is_registered('customer_id') ) {
?>

******** DELETE THIS LINE AND INSERT THE CODE FOR REGISTERED CUSTOMERS ONLY HERE ********

<?php
 }
?>

 

Not exactly what you want probably.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

You can "hide" things from non-registered customers like this:

 

<?php
 if ( tep_session_is_registered('customer_id') ) {
?>

******** DELETE THIS LINE AND INSERT THE CODE FOR REGISTERED CUSTOMERS ONLY HERE ********

<?php
 }
?>

 

Not exactly what you want probably.

 

Would this work for an entire page? Could I substitute this line for the code for the entire page?:

******** DELETE THIS LINE AND INSERT THE CODE FOR REGISTERED CUSTOMERS ONLY HERE ********

For example: I have 20 videos and anyone can click and view the first 3 videos only (they dont need to be logged in). But when they log in, they can go back to the SAME page and they can click on and view all of the videos?

 

Or would I have to apply the code you suggested above to every link I have on the page? In other words, if I have 20 videos would I have to apply the code 20 times? thanks

Posted

Without seeing how your code is contructed I can't suggest how to apply the snippet I posted correctly.

 

If the links are coded individually you just need to wrap my code around the ones you want to hide.

 

If the links are constructed in a PHP loop scenario ( while, for - next, etc.) the proper application of the code I posted is a bit more complicated.

 

In this latter case I couldn't suggest a change without seeing the exact code you are using.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Without seeing how your code is contructed I can't suggest how to apply the snippet I posted correctly.

 

If the links are coded individually you just need to wrap my code around the ones you want to hide.

 

If the links are constructed in a PHP loop scenario ( while, for - next, etc.) the proper application of the code I posted is a bit more complicated.

 

In this latter case I couldn't suggest a change without seeing the exact code you are using.

 

Thanks for your reply. Here is the code I'm using:

 

<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
   </tbody>
</table>

Posted

Based on the info provided in your first post (hide all but the first two links from non-registered/logged in customers) the code becomes:

 

<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
<?php
 if ( tep_session_is_registered('customer_id') ) {
?>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
<?php
 }
?>
   </tbody>
</table>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Based on the info provided in your first post (hide all but the first two links from non-registered/logged in customers) the code becomes:

 

<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
<?php
 if ( tep_session_is_registered('customer_id') ) {
?>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
<?php
 }
?>
   </tbody>
</table>

 

Now I'm getting this error message:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/buildawe/public_html/store/catalog/includes/languages/english/index.php on line 23

 

This is line 23:

           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>

Posted

Well if you're trying to embed the code I posted into a language file - It won't work.

 

I can't help with the error on line 23 unless you post the previous 22 lines.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Well if you're trying to embed the code I posted into a language file - It won't work.

 

I can't help with the error on line 23 unless you post the previous 22 lines.

 

ok. I'm trying to place the table on my homepage. This is the previous 23 lines:

 

<?php
/*
 $Id: $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_MAIN', '<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,'','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>

 

Thanks

Posted

            <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>

 

If you have apostrophe's inside a define like that you have to "escape" them (put a \ in front if them) like shown above.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Well if you're trying to embed the code I posted into a language file - It won't work.

 

I can't help with the error on line 23 unless you post the previous 22 lines.

 

Since the code doesn't work by placing it into a language file, where do I need to put that code to make it work? Or what changes do I need to make to the code so that I have a table on my homepage that only registered users can click and view the videos?

I appreciate your help.

 

I got rid of the errors, btw.

Posted

Using the same code as you posted before, replace your define for TEXT_MAIN with this:

 

define('PART_1', '<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>');

define('PART_2', '        <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,\'\',\'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>');

define('PART_3','    </tbody>
</table>');

if ( tep_session_is_registered('customer_id') ) 
 define('TEXT_MAIN', PART_1 . PART_2 . PART_3 );
else 
 define('TEXT_MAIN', PART_1 . PART_3 );

 

I tested this before I posted it - I got the correct output with no errors...

:)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Using the same code as you posted before, replace your define for TEXT_MAIN with this:

 

define('PART_1', '<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>');

define('PART_2', '        <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,\'\',\'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>');

define('PART_3','    </tbody>
</table>');

if ( tep_session_is_registered('customer_id') ) 
 define('TEXT_MAIN', PART_1 . PART_2 . PART_3 );
else 
 define('TEXT_MAIN', PART_1 . PART_3 );

 

I tested this before I posted it - I got the correct output with no errors...

:)

 

Is it possible for me to show people what they are missing. Right now people who are not logged in cannot see the list of videos. I'd like them to see the titles of the videos (but they cant click on them to view since they are not logged in) so they get an idea of the structure of the series of tutorials before they sign up. Is that possible?

Thanks again for your assistance.

Posted

Is it possible for me to show people what they are missing. Right now people who are not logged in cannot see the list of videos. I'd like them to see the titles of the videos (but they cant click on them to view since they are not logged in) so they get an idea of the structure of the series of tutorials before they sign up. Is that possible?

Thanks again for your assistance.

 

define('PART_1', '<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>');

define('PART_2', '        <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,\'\',\'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>');

define('PART_3', '        <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>');


define('PART_4','    </tbody>
</table>');


if ( tep_session_is_registered('customer_id') ) 
 define('TEXT_MAIN', PART_1 . PART_2 . PART_4 );
else 
 define('TEXT_MAIN', PART_1 . PART_3 . PART_4 );

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

define('PART_1', '<table width="650" cellspacing="1" cellpadding="1" border="0" align="center">
   <caption>
   <p><span style="color: rgb(128, 0, 0);"><span style="font-family: Arial Black;"><strong>Part 1: Test Videos<br />
   </strong></span></span></p>
   </caption>
   <tbody>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 1. Test Video number 1</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test/test.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
           <td> 2. Test Video Number 2</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test1/test1.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video.jpg" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" alt="" src="/store/catalog/userfiles/../images/green_block.jpg" /></td>
       </tr>');

define('PART_2', '        <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test2/test2.html" onclick="window.open(this.href,\'\',\'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=yes,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <a href="http://buildawebsite.ie/store/catalog/media/test4/test4.html" onclick="window.open(this.href,\'\',\'resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status\'); return false"><img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></a></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>');

define('PART_3', '        <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 3. Test Video Number 3</td>
           <td> </td>
           <td valign="middle" align="center"> <img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>
       <tr>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
           <td> 4. Test Video Number 4</td>
           <td> </td>
           <td valign="middle" align="center"> <img height="18" width="54" border="0" align="middle" src="/store/catalog/userfiles/../images/play_video_grey.gif" alt="" /></td>
           <td valign="middle" align="center"><img height="25" width="11" border="0" align="middle" src="/store/catalog/userfiles/../images/red_block.gif" alt="" /></td>
       </tr>');


define('PART_4','    </tbody>
</table>');


if ( tep_session_is_registered('customer_id') ) 
 define('TEXT_MAIN', PART_1 . PART_2 . PART_4 );
else 
 define('TEXT_MAIN', PART_1 . PART_3 . PART_4 );

 

Thank you very much.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...