PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   General Discussion (http://www.photopost.com/forum/general-discussion/)
-   -   Some content in Announcement box for guests only? (http://www.photopost.com/forum/general-discussion/139741-some-content-announcement-box-guests-only.html)

skidpics April 6th, 2009 11:27 AM

Some content in Announcement box for guests only?
 
I want to show the accouncement box, but I also want to show some of the things to registered users, and some to the guests to the site.

What can I do to the php in my announcement box to only show something IF the user is NOT logged in?

Chuck S April 6th, 2009 12:23 PM

make the contents of the announcements box say a php file like so but remember there is a size limit.

Code:

Content visible to verified customers only.

skidpics April 6th, 2009 04:38 PM

This doesn't seem to work. It still shows with the echo and print commands on the screen.i.e. 0 ) { echo << and PPPRINT; } else { echo <<

<span class="TabbedPanelsContent">
<?
if ( $User['userid'] > 0 )
{
echo <<<PPPRINT




PPPRINT;
}
else
{
echo <<<PPPRINT

Quote:

<table width="93%">
<tr>
<td width="50%"><p class="style6">Uploading to skidpics.com is really simple with this plugin app! Click on <strong>Browse</strong> to select files or use drag'n'drop from the explorer, then click on <strong>Upload</strong> to send the pictures to the server. From there you need to processthe images by following the link at the bottom of the page. <strong>(this only works if you are NOT LOGGED IN!). </strong></p>
<p class="style6">Although this uploader is quit fast, <strong>registered user have access to a more robust uploader</strong>, with more options. <a href="http://skidpics4images/skidpics.com/forum/" target="_blank">Register for free</a> and gain access to lots more options...</p>
<p class="style6"><strong>1. Browse and select the photos you want to upload.</strong></p>
<p class="style6"><strong>2. Once Added, click on Upload to start uploading your photos.</strong></p>
<p class="style6"><span class="style4">3. Once Uploads are 100% Done, <em><a href="http://skidpics4images.skidpics.com/photopost/bulkupload.php?ppaction=addphotos&do=preview&donotdelete=&photopath=0&upuser=&notify=&rating=yes&comments=yes&defcat=501&deftitle=&defdesc=&defdesc=&keywords=&numprocess=10&processall=no&dthumbs=yes&mature=no">Click here</a> to process the photos</em>. Your photos <em>WILL NOT BE ADDED</em> unless you process the photos!</span><br>
</p></td>
<td width="50%"><object id="FlashFilesUpload" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="450" height="350" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" viewastext>
<!-- Replace symbols " with the &quot; at all parameters values and
symbols "&" with the "%26" at URL values or &amp; at other values!
The same parameters values should be set for EMBED object below. -->
<!-- Processing Script Start - Be sure the change the upload directory in this script -->
<param name="FlashVars" value"uploadUrl=powuploadfiles.php" />
<!-- Processing Script End - Be sure the change the upload directory in this script -->
<param name="BGColor" value="#F8F6E6" />
<param name="Movie" value="ElementITMultiPowUpload1.7.swf" />
<param name="Src" value="ElementITMultiPowUpload1.7.swf" />
<param name="WMode" value="Window" />
<param name="Play" value="-1" />
<param name="Loop" value="-1" />
<param name="Quality" value="High" />
<param name="SAlign" value="" />
<param name="Menu" value="-1" />
<param name="Base" value="" />
<param name="AllowScriptAccess" value="always" />
<param name="Scale" value="ShowAll" />
<param name="DeviceFont" value="0" />
<param name="EmbedMovie" value="0" />
<param name="SWRemote" value="" />
<param name="MovieData" value="" />
<param name="SeamlessTabbing" value="1" />
<param name="Profile" value="0" />
<param name="ProfileAddress" value="" />
<param name="ProfilePort" value="0" />
<!-- Embed for Netscape,Mozilla/FireFox browsers support. Flashvars parameters are the same.-->
<!-- Replace symbols " with the &quot; at all parameters values and
symbols "&" with the "%26" at URL values or &amp; at other values!

at the end of line 66, flashvars, the &redirectUploadUrl= is the value you want that will redirect the script once the uploads
are completed - change it or delete that part out -->
<!-- Use &redirectUploadUrl= on line 72 to forward to a page: uploadUrl=powuploadfilestest.php&redirectUploadUrl=http://skidpics.com/uploadphoto.php -->
<embed bgcolor="#F8F6E6" id="EmbedFlashFilesUpload" src="ElementITMultiPowUpload1.7.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="410" height="300" flashvars="uploadUrl=powuploadfiles.php"> </embed>
</object></td>
</tr>
<tr>
<td colspan="2"><hr />
<p style="text-align: center;">Having problems with this upload? <a href="http://skidpics4images.skidpics.com/photopost/uploadphoto.php">Use our default one.</a></p>
<p style="text-align: center;">&nbsp;</p></td>
</tr>
</table>
PPPRINT;
}
?>
</span>

Chuck S April 6th, 2009 05:26 PM

<span class="TabbedPanelsContent">

???

There is more here than your stating but anyway try placing PPPRINT; before the if statement and at the end of the code I gave after the closing bracket on a new line place echo <<<PPPRINT

skidpics April 6th, 2009 07:55 PM

using a spry menu bar inside the announcement box - like a tabbed menu

Chuck S April 6th, 2009 08:42 PM

well whatever you want to do is fine but you must echo and print your way in and out between html and php. So if you do as I stated should work fine but then again maybe not. Maybe you would have to actually eval the contents to tell the program there is php code there. You might want to further make it easier and just edit the announcement template directly with any code.

skidpics April 7th, 2009 05:27 AM

hardcoding it works perfect - thanks! Batch uploader for guest live on the site now.. disappears when loggen in..

Chuck S April 7th, 2009 07:05 AM

Have a good one.


All times are GMT -5. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97