hi Jad -
i'm trying to add some more links on each blog page so under these links Jad's blog | add new comment | 29 reads ( categories: Daily | Jordan | Life )
I want to add - Google for similar topics - Wikipedia Search
but I couldn't figure out which file I have to edit to add those custom links I have tried blog.module, page.module, node.module but nothing there also I have checked the theme files, so please someone direct me
I think the place you want to look is in the modules/blog.module file. The blog_link() function is what adds links to the bottom of blog entries (only). Here's a code snippet from Drupal 4.6.2's blog.module:
- - - - - - - - - - - - - - - function blog_link($type, $node = 0, $main = 0) { $links = array();
if ($type == 'node' && $node->type == 'blog') { if (arg(0) != 'blog' && arg(1) != $node->uid) { $links[] = l(t("%username's blog", array('%username' => $node->name)), "blog/$node->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $node->name)))); $links[] = '<a href="http://www.google.com">Google me!</a>'; } }
return $links; } - - - - - - - - - - - - - - -
The links[] array hold all the links that will be displayed at the bottom of the blog. I added the second "$links[] = ..." statment above (with the google link) to show an example of how you might add links of your choice.
Cheers, --Katin
maybe someone can find this useful I use something similar to use adsense search on some parts of the website using the title as a search string:
$links[] = "<script language="JavaScript" type="text/javascript"><!-- function search ( mytext ) { document.google.q.value = mytext ; document.google.submit() ; }--> </script><!-- Search Google --><form name="google" method="get" action="http://www.google.com/custom%5C" target="_top"> <input type="hidden" name="q" value=""></input> <input type="hidden" name="sa" value="Search"></input> <input type="hidden" name="client" value="pub-9360264097731242"></input> <input type="hidden" name="forid" value="1"></input> <input type="hidden" name="ie" value="ISO-8859-1"></input> <input type="hidden" name="oe" value="ISO-8859-1"></input> <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input> <input type="hidden" name="hl" value="en"></input><a href="javascript:search('".$node->title."')">Support GH</a></form><!-- Search Google -->";