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. Quote Link to comment 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. Quote Link to comment 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... Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
vinnier Posted March 14, 2010 Author Share Posted March 14, 2010 Never thought about that! Thanks! Quote Link to comment 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"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.