Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
sqzdog
Involved
Involved


Joined: Sep 22, 2003
Posts: 252

PostPosted: Fri Jun 25, 2004 6:51 pm Reply with quote

I want to create a block that his the "Download Adobe Reader" image in it at the top and when you click it it goes to the adobe site. I have played with it but I can't seem to get the hang of it. I left the script I was working on at work and can't post it here. Can you help?
 
View user's profile Send private message Send e-mail
GeekyGuy
Client


Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio

PostPosted: Fri Jun 25, 2004 7:15 pm Reply with quote

I am still learning all of this stuff too, but this is the code I use for a clickable link to this site from a block on my site:

-----------------------------------------------------------------------------------
if (eregi("block-Raven.php",$_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}

$content .= "<center><a href=\"http://www.ravenphpscripts.com\" target=\"_blank\"><img src=\"images/blocks/Raven.gif\" style=\"border:none;\" title=\"Raven's PHP Scripts\" /></a></center>\n";
-----------------------------------------------------------------------------
Of course you would change the URL, image, and title. Hope this helps

_________________
"The Daytona 500 is ours! We won it, we won it, we won it!", Dale Earnhardt, February 15th, 1998, Daytona 500 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
sqzdog
PostPosted: Fri Jun 25, 2004 8:23 pm Reply with quote

Ok, here's what I have so far.

Quote:

<?php

if (eregi("block-Friday_Flyer.php",$_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}

$content .= "<center><a href=\"http://www.adobe.com/products/acrobat/readstep2.html\" target=\"_blank\"><img src=\"images/blocks/acrobat.gif\" style=\"border:none;\" title=\"Friday Flyer Archives\" /></a></center>\n";

?>


Now, what I want to do is every week add a link that will show above the image that will basically say this:

Quote:

<a href="http://fluvannaonline.com/fridayflyer/06-18-04.pdf">June 18, 2004</a>


What I am doing is putting a link up every week to the local community newsletter. So each week I would add a new line of code like the one just above, I will just change the file name and display name. The adobe image would be permanently displayed at the bottom of the block. I should never have to touch that line of code.
 
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Fri Jun 25, 2004 9:30 pm Reply with quote

Code:


<?php
if (eregi("block-Friday_Flyer.php",$_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
$the_array = Array();
$handle = opendir('./fridayflyer/');
while (false !== ($file = readdir($handle))) {
   if ($file != "." && $file != "..") {
      if (eregi("\.pdf$", $file)){
   $the_array[] = $file;
      }
   }
}

closedir($handle);
sort ($the_array);
reset ($the_array);
while (list ($key, $val) = each ($the_array)) {
$content .="<div align='left'><a href='./fridayflyer/$val' target='_blank'>$val</a></div><br>\n";

}
  $content .= "<div align='center'><a href=\"http://www.adobe.com/products/acrobat/readstep2.html\" target=\"_blank\"><img src=\"images/blocks/acrobat.gif\" style=\"border:none;\" title=\"Friday Flyer Archives\" /></a></div>\n";

?>


Not sure how it will handle your file names it goes in alphabetical order now not the time created or anything fancy.
 
View user's profile Send private message
sqzdog
PostPosted: Fri Jun 25, 2004 9:40 pm Reply with quote

What I am doing is inserting the html into the content section of ADD A NEW BLOCK. Can it be done that way?
 
sixonetonoffun
PostPosted: Fri Jun 25, 2004 9:49 pm Reply with quote

Thats fine to do it that way of course! I just thought something like this might save you some time. It reads all pdf files in the directory fridayflyer and outputs the list to your block as links to the pdf files and has the adobe image at the bottom.
 
sqzdog
PostPosted: Fri Jun 25, 2004 9:52 pm Reply with quote

Look at my site Only registered users can see links on this board! Get registered or login! and see the top right block? Each week I will add a new link. I want to put that clickable logo at the bottom of the block and leave it there. I guess as I add stuff, the block will expand. Sorry to keep taxing your brain.
 
sixonetonoffun
PostPosted: Fri Jun 25, 2004 10:01 pm Reply with quote

No thats fine. All you have to do is edit the block each week with a new html link to the new file just add it to the top each time with a <br> after it. Just use normal html don't try to add the style= though or you'll probably run into troubles.
 
sqzdog
PostPosted: Sat Jun 26, 2004 8:23 am Reply with quote

Ok, what's the code for placing the image at the bottom of the block? That's where I'm stuck
 
sixonetonoffun
PostPosted: Sat Jun 26, 2004 8:59 am Reply with quote

Yourlinks
<br>
<div align="center" valign="middle">
<a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank"><img src="images/blocks/acrobat.gif" align="center" title="Friday Flyer Archives" /></a></div>

Something link this should work.
 
sqzdog
PostPosted: Sat Jun 26, 2004 9:07 am Reply with quote

thanks so much! I'll give it a try this afternoon.
 
sqzdog
PostPosted: Tue Oct 12, 2004 6:49 am Reply with quote

I want to use the sample block and have it with the following info:

Quote:

Text that says " Click Here to Get Lake Monticello's Weekly Newsletter (the "click here" would be linked to: Only registered users can see links on this board! Get registered or login!


Then under this text I would want to add the adobe reader logo that links them to the adobe site for the download. The link that I have is:

Quote:
Only registered users can see links on this board! Get registered or login!


The image for the adobe icon is located at: images/blocks/acrobat.gif

I have played with this over and over and can't get it right.
 
blith
Client


Joined: Jul 18, 2003
Posts: 977

PostPosted: Tue Oct 12, 2004 7:39 am Reply with quote

Code:
<a href="http://www.adobe.com/products/acrobat/readstep2.html"><img src="images/blocks/acrobat.gif "></a>
 
View user's profile Send private message Visit poster's website
sqzdog
PostPosted: Tue Oct 12, 2004 8:10 pm Reply with quote

That really doesn't answer my question. I need the code for the entire block since I've never made one before.
 
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1159
Location: Sanbornton, NH USA

PostPosted: Tue Oct 12, 2004 11:07 pm Reply with quote

Save this file as "block-Adobe.php" (Without the quotes) and put it in your blocks folder.
IF YOU NAME IT ANYTHING ELSE, be sure to change the if (eregi("block-Adobe.php" section accordingly!

Code:
<?php

###########################################################
# Sample Scrolling content block with static first icon   #
# by Steph Benoit - http://64bit.us                       #
# Includes latest security methodology by Chatserv        #
# Gives a couple of examples of other linkable images     #
# Includes mouse-over "title" for Firefox Browsers        #
# I think this is what you are looking for                #
# If you want to add more items or documents, simply copy #
# the examples to link to other stuff.  The beauty        #
# of the marquee is that you can add a ton of content     #
###########################################################
if (eregi("block-Adobe.php", $_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}
$content  .=  "<center>Get Adobe Acrobat Reader<br><br><a href=\"http://www.adobe.com/products/acrobat/readstep2.html\" target=\"_blank\"><img src=\"http://www.adobe.com/images/get_adobe_reader.gif\" alt=\"Click here to get Adobe Acrobat Reader\" title=\"Click here to get Adobe Acrobat Reader\" width=88 height=31></a><BR><BR>"
 ."";
$content .= "<marquee direction=\"up\" scrollamount=\"2\" height=\"200\" onmouseover='this.stop()' onmouseout='this.start()'>"
 ."";
$content  .=  "<center>";
$content  .=  "<a href=\"http://ravenphpscripts.com/\" target=\"_blank\"><img src=\"http://ravenphpscripts.com/images/mylinks/RavenWebServices.gif\" alt=\"Additional Scripts Provided by RavenPHPScripts.com\" title=\"Additional Scripts Provided by RavenPHPScripts.com\" width=102 height=47></a><BR><BR>";
$content  .=  "<a href=\"http://64bit.us/\" target=\"_blank\"><img src=\"http://64bit.us/images/64bitsmalla.gif\" alt=\"Additional Scripts Provided by 64bit.us\" title=\"Additional Scripts Provided by 64bit.us\" width=88 height=31></a><BR><BR>";
$content  .=  "<a href=\"http://fluvannaonline.com/fridayflyer/06-18-04.pdf\">June 18, 2004 Flyer<img src=\"LOCATION OF THE IMAGE ICON OF YOUR FLYER - HOPEFULLY an 88 x 30 ICON\" alt=\"June 18, 2004 Flyer\" title=\"June 18, 2004 Flyer\" width=88 height=31</a><BR><BR>";
$content  .=  "</marquee></center>";
?>


Then simply make an 88x31 image for each flyer like one called june18.gif and save it to an image folder and point the above to it (where I have <img src=\"LOCATION OF THE IMAGE ICON OF YOUR FLYER - HOPEFULLY an 88 x 30 ICON\") Then, in your block, you'd see an image like this scroll by....Image

You could make one in paint with a different background color for each week, or whatever you like... Simple enough anyway.... If you get a ton of icons, you can increase the size of the block (see above) from 200 to something bigger, say 250 or 300.... Again, the beauty of the scroll is that the Adobe image stays fixed, and your dynamic content rolls.

Hope that helps!

_________________
Steph Benoit Only registered users can see links on this board! Get registered or login!
1CMS, 100% Section 508 and W3C XHTML/CSS Compliant (Truly) 
View user's profile Send private message Visit poster's website
djrino
Regular
Regular


Joined: Mar 11, 2005
Posts: 52

PostPosted: Sat Nov 04, 2006 6:18 pm Reply with quote

hi i wanto to put a image on the module text like these sites here

Only registered users can see links on this board! Get registered or login!

look on the name of the block it is an image not text
and each block is different with different image block name

any help with this is apreciate

Tnx
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sat Nov 04, 2006 9:02 pm Reply with quote

HAHA, They need to update their ip2c.

One way of doing what you would like is to remove the image from the blocks.html file within the theme, And set the Content to display a seperating image.

Other then that, another approach might be recomended by others.

Until I see that site, I couldnt tell you exactly HOW they did what they did.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
djrino
PostPosted: Sun Nov 05, 2006 11:23 am Reply with quote

hi

Quote:
One way of doing what you would like is to remove the image from the blocks.html file within the theme, And set the Content to display a seperating image.


tnx for reply

do you can helm me to make this?

tnx for your time
Rino
 
64bitguy
PostPosted: Mon Nov 06, 2006 3:13 am Reply with quote

djrino wrote:
hi i wanto to put a image on the module text like these sites here

Only registered users can see links on this board! Get registered or login!

look on the name of the block it is an image not text
and each block is different with different image block name

any help with this is apreciate

Tnx


Not to be a bother, but this most recent question in the thread is OffTopic

What you are asking about (and the subsequent replies) is actually relative to having your theme configuration use images to replace Block Titles.

I know I wrote about this extensively somewhere, but you can find some info at:
Only registered users can see links on this board! Get registered or login!

Steph
 
djrino
PostPosted: Mon Nov 06, 2006 5:16 pm Reply with quote

many tnx for the link
and sorry for the of topic man

Tnx again
Rino
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©