Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
oprime2001
Worker
Worker



Joined: Jun 04, 2004
Posts: 119
Location: Chicago IL USA

PostPosted: Tue Sep 07, 2004 9:13 pm Reply with quote

The installation instructions for this add-on Only registered users can see links on this board! Get registered or login! seems simple enough, but for the life of me, I cannot get the add-on to function properly.

Has anyone else tried to integrate Only registered users can see links on this board! Get registered or login! within their phpnuke site? Anyone else care to try and report their results here? It's prolly something very simple that I am missing, but it's getting late over here, and my eyes are getting blurry! Thanks.

From the developer's website:
Only registered users can see links on this board! Get registered or login! locates user-defined keywords and phrases in an HTML document or string and subsequently replaces the keywords or phrases with anchor tags linking to user-defined URLs. As well, pre-defined ‘template’ anchor tags are included for Google.com, Dictionary.com, Webopedia.com, Vivisimo.com, CPAN.org, Freshmeat.net and others. With phpGiggle, anchor tags for an entire website can be contained in a single file, with links being dynamically generated when the HTML is displayed to vistor’s browser. This is particularly useful for sites with dynamically generated content, such as Blogs, News sites, etc. Content creators need-not worry about creating links when posting new content, as phpGiggle will auto link the keywords and phrases at runtime. phpGiggle performs dynamic anchor tag generation very quickly and with no noticeable impact to the browser, providing a pleasant user experience that includes plentiful links to additional content which the reader may find useful.
 
View user's profile Send private message
oprime2001







PostPosted: Wed Sep 08, 2004 12:23 pm Reply with quote

After putzing around and much trial-and-error, I was able to add phpGiggle's keyword highlighting to one of my phpnuke website's news articles. N.B. my changes are not necessarily the most efficient implementation of the phpnuke and phpGiggle code -- but it works!

Here are the changes that I made to sections of /themes/ExtraLite/theme.php
Code:
FormatStory($thetext, $notes, $aid, $informant) {

$thetext_giggle = giggle_autolink($thetext,-1,1);
    global $anonymous;
    if ($notes != "") {
   $notes = "<b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   echo "<font class=\"content\">$thetext_giggle<br>$notes</font>\n";
    } else {
   if($informant != "") {
       $boxstuff = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $boxstuff = "$anonymous ";
   }
   $boxstuff .= ""._WRITES." <i>\"$thetext_giggle\"</i> $notes\n";
   echo "<font class=\"content\">$boxstuff</font>\n";
    }
}

function themeheader() {
require_once("phpGiggle/phpgiggle.inc.php");
    echo "<body bgcolor=\"ffffff\" text=\"000000\" link=\"0000ff\" vlink=\"0000ff\">"
   ."<br>";
    if ($banners) {
   include("banners.php");
    }
    echo " "
   ."<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" bgcolor=\"FFFFFF\">"
   ."<tr><td width=\"100%\">"
   ."<a href=\"index.php\">"
   ."<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0\" id=\"logo\" width=\"426\" height=\"46\">"
   ."<param name=\"movie\" value=\"themes/ExtraLite/images/logo.swf\">"
   ."<param name=\"quality\" value=\"high\">"
   ."<param name=\"bgcolor\" value=\"#FFFFFF\">"
   ."<embed name=\"logo\" src=\"themes/ExtraLite/images/logo.swf\" quality=\"high\" bgcolor=\"#FFFFFF\" width=\"426\" height=\"46\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">"
   ."</embed>"
   ."</object>"
   ."</a>"
   ."</td><td align=\"right\">"   

     ."<a href=\"http://www.1and1.com/?k_id=6600643\" target=\"_blank\"><img src=\"http://1and1.org/banners/counting1.gif\" width=\"468\" height=\"60\" border=\"0\"/></a>"


   ."</td>"
   ."</tr></table>";
    $public_msg = public_message();
    echo "$public_msg<br>";
    echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tr><td valign=\"top\" width=\"150\" bgcolor=\"ffffff\">";
    blocks(left);
    echo "<img src=\"images/pix.gif\" border=\"0\" width=\"150\" height=\"1\"></td><td>&nbsp;&nbsp;</td><td width=\"100%\" valign=\"top\">";
}

function themefooter() {
    global $index;
    if ($index == 1) {
   echo "</td><td>&nbsp;&nbsp;</td><td valign=\"top\" bgcolor=\"#ffffff\">";
   blocks(right);
   echo "</td>";
    }
    echo "</td></tr></table></td></tr></table>";
    footmsg();
}

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
$title_giggle = giggle_autolink($title,-1,1);
    global $anonymous;
    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" bgcolor=\"000000\" width=\"100%\"><tr><td>"
        ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\"><tr><td bgcolor=\"ffffff\">"
        ."<b>$title_giggle</b><br>"
        ."<font class=\"tiny\">"
        .""._POSTEDBY." <b>";
    formatAidHeader($aid);
    echo "</b> "._ON." $time $timezone ($counter "._READS.")<br>"
   ."<b>"._TOPIC."</b> <a href=\"modules.php?name=News&amp;new_topic=$topic\">$topictext</a><br>"
   ."</font></td></tr><tr><td bgcolor=\"ffffff\">";
    FormatStory($thetext, $notes, $aid, $informant);
    echo "<br><br>"
        ."</td></tr><tr><td bgcolor=\"ffffff\" align=\"right\">"
        ."<font class=\"content\">$morelink</font>"
        ."</td></tr></table></td></tr></table>"
   ."<br>";
}

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
$thetext_giggle = giggle_autolink($thetext,-1,1);
    global $admin, $sid;
    if ("$aid" == "$informant") {
   echo"
   <table border=0 cellpadding=0 cellspacing=0 align=center bgcolor=000000 width=100%><tr><td>
   <table border=0 cellpadding=3 cellspacing=1 width=100%><tr><td bgcolor=FFFFFF>
   <b>$title</b><br><font class=tiny>Posted on $datetime";
   if ($admin) {
       echo "&nbsp;&nbsp; $font2 [ <a href=admin.php?op=EditStory&sid=$sid>Edit</a> | <a href=admin.php?op=RemoveStory&sid=$sid>Delete</a> ]";
   }
   echo "
   <br>Topic: <a href=modules.php?name=News&amp;new_topic=$topic>$topictext</a>
   </td></tr><tr><td bgcolor=ffffff>
   $thetext_giggle
   </td></tr></table></td></tr></table><br>";
    } else {
   if($informant != "") $informant = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&username=$informant\">$informant</a> ";
   else $boxstuff = "$anonymous ";
   $boxstuff .= "writes <i>\"$thetext\"</i> $notes";
   echo "
   <table border=0 cellpadding=0 cellspacing=0 align=center bgcolor=000000 width=100%><tr><td>
   <table border=0 cellpadding=3 cellspacing=1 width=100%><tr><td bgcolor=FFFFFF>
   <b>$title</b><br><font class=content>Contributed by $informant on $datetime</font>";
   if ($admin) {
       echo "&nbsp;&nbsp; $font2 [ <a href=admin.php?op=EditStory&sid=$sid>Edit</a> | <a href=admin.php?op=RemoveStory&sid=$sid>Delete</a> ]";
   }
   echo "
   <br>Topic: <a href=modules.php?name=News&amp;new_topic=$topic>$topictext</a>
   </td></tr><tr><td bgcolor=ffffff>
   $thetext
   </td></tr></table></td></tr></table><br>";
    }
}

My modifications can be found by searching for "giggle" in the above sample code. Hope that helps someone.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

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 ©