Nuke Toolbar

          
Quick Links 
 [Home Page ][ Category Listings ][ Forum Listings][ Forum FAQs]
[ HomeDNS - Domains ]  [ Nuke Resources ]  [ Nuke Skins and Themes ]  [ Nuke Sites Link Directory ]
[ LearningLinux.com ]  [ Nuke Fixes ]
[ NukeZone Hosting ]  [ Domain Name Database ]
Nuke Forums Forum Index

Nuke Sites Link Directory


Javascript and BLOCKs

 
Post new topic   Reply to topic    Nuke Forums Forum Index -> PHP-Nuke 6.x Discussions
View previous topic :: View next topic  
Author Message
clam729
Warrant Officer
Warrant Officer


Joined: 08 Oct 2002
Posts: 73


PostPosted: Tue Jan 14, 2003 9:41 pm    Post subject: Reply with quote

hey all,
this is a line in contacts block:
$content .= "<div align="right"><a href="mailto:me@mydomain.com?subject=blah">click me</a><strong><big> ·</big></strong></div>n";

this is the code that i would like to incorporate into it instead:
<script type="text/javascript">
<!--
var first = 'ma';
var second = 'il';
var third = 'to:';
var address = '&#109;&#101;';
var domain = '&#109;&#121;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;';
document.write('<a href="');
document.write(first+second+third);
document.write(address);
document.write('&#64;');
document.write(domain);
document.write('" title="click me">');
document.write('click me</a>');
// -->
</script>

is this possible ? i cant squat to show up "inside" the block, it always shows up above and to the right.

thanks.

[ This Message was edited by: clam729 on 2003-01-15 17:56 ]

[ This Message was edited by: clam729 on 2003-01-15 17:58 ]
Back to top
View user's profile Send private message
chris
President
President


Joined: 06 Nov 2002
Posts: 1047
Location: Outer Space

PostPosted: Wed Jan 15, 2003 6:10 am    Post subject: Reply with quote

Sure it is. Write:

Code:

$content .= "<script type="text/javascript"> "
$content .= "<!-- "
$content .= "var first = 'ma'; "
$content .= "var second = 'il'; "
$content .= "var third = 'to:'; "
$content .= "var address = '&#109;&#101;'; "
$content .= "var domain = '&#109;&#121;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;'; "
$content .= "document.write('<a href="'); "
$content .= "document.write(first+second+third); "
$content .= "document.write(address); "
$content .= "document.write('&#64;'); "
$content .= "document.write(domain); "
$content .= "document.write('" title="click me">'); "
$content .= "document.write('click me</a>'); "
$content .= "// --> "
$content .= "</script> "


I have included the code in "", escaped any other " and assigned it to the $content variable. That's how you create blocks in PHPNuke, see blocks/readme.txt in your installation.

Regards

Chris
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chris
President
President


Joined: 06 Nov 2002
Posts: 1047
Location: Outer Space

PostPosted: Wed Jan 15, 2003 6:14 am    Post subject: Reply with quote

By the way, if you are using vi and you have a HTML file you want to transform to a PHPNuke block code, here's how to do it:

In vi, do:

Code:

1,$s/"/"/g                    (escape all ")
1,$s/^/$content .= "/         (add $content .= " at the start of every line)
1,$s/$/"/                       (add " at the end of every line)


You don't think I did my previous post by hand, do you?

Regards

Chris
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Wed Jan 15, 2003 6:44 am    Post subject: Reply with quote

I think those document.write's will still show up above the block.
You might have to use this:
Code:
ob_start();
echo   "<script type="text/javascript">n"
      ."<!--n"
      ."var first = 'ma';n"
      ."var second = 'il';n"
      ."var third = 'to:';n"
      ."var address = '&#109;&#101;';n"
      ."var domain = '&#109;&#121;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;';n"
      ."document.write('<a href="');n"
      ."document.write(first+second+third);n"
      ."document.write(address);n"
      ."document.write('&#64;');n"
      ."document.write(domain);n"
      ."document.write('" title="click me">');n"
      ."document.write('click me</a>');n"
      ."// -->n"
      ."</script>n";
$output = ob_get_contents();
ob_end_clean();
$content .= $output;
Back to top
View user's profile Send private message
jeffvato
Private
Private


Joined: 18 Jul 2004
Posts: 2


PostPosted: Sun Jul 18, 2004 8:36 am    Post subject: Reply with quote

Here is the code I need to place on my site. I'm not getting it right. I tried changing it but it still wont work.

Can anyone help?


<!-- Begin Team FishHoo! Banner Exchange Code -->
<P><CENTER><A HREF="http://www.fishhoo.com/exchange.htm" TARGET="_blank"><IMG SRC="http://www.fishhoo.com/but-fishhoo-team.gif" WIDTH=40 HEIGHT=40 ALT="Team FishHoo! Banner Exchange" BORDER=2></A><IFRAME SRC="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?iframe;member=jeffvato" MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO WIDTH=404 HEIGHT=44><SCRIPT LANGUAGE="JavaScript" SRC="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?jscript;member=jeffvato"></SCRIPT><NOSCRIPT><A HREF="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?member=jeffvato;banner=NonSSI;page=01" TARGET="_blank"><IMG SRC="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?member=jeffvato;page=01" WIDTH=400 HEIGHT=40 ALT="Team FishHoo! Banner Exchange" BORDER=2></A></NOSCRIPT></IFRAME></CENTER>
<!-- End Team FishHoo! Banner Exchange Code -->


Jeffvato
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Nuke Forums Forum Index -> PHP-Nuke 6.x Discussions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group




Forum Options
Main Menu
index.phpForums Index
    - Collaped View
    + Expanded View
FAQFAQ
SearchSearch
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesLog in to check your private messages
Log inLog in

Visitor Options
 
Subscribe
Unsubscribe


Keep informed of updates, bug fixes, software releases, news and more!
Installation or Upgrade Services for phpNuke or PostNuke? Require site maintenance, addons, modules or custom themes? Send private message or e-mail for rates and availablity.

Quick Links
  Domain Names
  Firewall Forums
  Joke Crazy
  Learning Linux
  Find your IP Fast!
  Purchase WinRAR

Trusted Nuke Sites
  NukeZone Hosting
  CMS Focus
  NukeFixes.com
  NukeResources.com
  NukeSkins.com
  NukeSites.com
  PHPNuke.org

Sponsor Links


NukeZone Hosting