vinnier Posted March 14, 2010 Share Posted March 14, 2010 Hi, Here is the situation, I have php script implemented into 2 pages, on one page I need it the way it is cause it's the main page but on the other page I would like to use only a part of it, sort of a preview. How do I block the text from showing? Just so I can copy,paste how of the text in the script and it won't show on the preview webiste. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/195198-how-to-block-something-from-showing/ Share on other sites More sharing options...
DaiLaughing Posted March 14, 2010 Share Posted March 14, 2010 I don't think I understand what you mean but could some of the content have a class (notonpreview or something) and then on the preview page you have a stylesheet which has display:none for that class? As the main page doesn't have that stylesheet it would show all the content and ignore the class=notforpreview. Link to comment https://forums.phpfreaks.com/topic/195198-how-to-block-something-from-showing/#findComment-1025957 Share on other sites More sharing options...
vinnier Posted March 14, 2010 Author Share Posted March 14, 2010 Looks like you understood me correctly Thanks for the reply and it would actually work and I was thinking about something similar myself but the problem with it is that the script is loaded from another site form the script provider so I can't edit it. That's why I am looking for a way to block the plain text from preview... Link to comment https://forums.phpfreaks.com/topic/195198-how-to-block-something-from-showing/#findComment-1025961 Share on other sites More sharing options...
DaiLaughing Posted March 14, 2010 Share Posted March 14, 2010 You could use the same concept but make ALL P tags display:none; on the preview page. Then override that for your own text by applying a class to them which would not be on the other content. Link to comment https://forums.phpfreaks.com/topic/195198-how-to-block-something-from-showing/#findComment-1025970 Share on other sites More sharing options...
vinnier Posted March 14, 2010 Author Share Posted March 14, 2010 Never thought about that! Thanks! Link to comment https://forums.phpfreaks.com/topic/195198-how-to-block-something-from-showing/#findComment-1025981 Share on other sites More sharing options...
cs.punk Posted March 16, 2010 Share Posted March 16, 2010 Rather than loading the data and setting it to not show why not make it not load at all? For example main.php // bla bla echo "$title"; echo "$rating"; echo "$photo"; list.php // bla bla echo "$title"; echo "$photo"; Link to comment https://forums.phpfreaks.com/topic/195198-how-to-block-something-from-showing/#findComment-1026895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.