Author |
Message |
Misha
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/477eb75344d0082e450f2.gif)
Joined: Jul 30, 2006
Posts: 205
Location: McLean, VA
|
Posted:
Tue May 22, 2007 11:32 am |
|
I'm thinking of writing my own links module, cause I'm not happy with SEO unfriandly standard one.
Several SEO applications are able of producing html code for the links page, the challenge is to include this code as it is in a nuke module as include file.
So, the question is: will the following code found in theme.php do the trick?:
Code: $tmpl_file = "XXXX/XXXX/my_links.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
|
Thanks, Misha |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue May 22, 2007 12:52 pm |
|
Funny you should mention that...I am looking into that, too, but the result is a while off.
Not sure this will do what you want. The purpose of the code you posted is to replace variables in a template file with data in PHP variables, then display the result. If your variables are defined and the template file contains references to those variables, this might work. But if the HTML is hard coded in the template file, there's no need to use this approach. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Misha
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue May 22, 2007 1:21 pm |
|
No surprise the author of nukeSEO is looking into this
As I realize after a year of struggling for traffic, nuke is SOOOOOOO seo unfriendly
Anyways, thanks for explaining the code - I learn something every time I talk to you, guys.
Any advice on what will do the trick for me? Ideally something like include statement? Cause I really don't want to take the pure html file and stuff it with quotes and slashes every time I add or remove a link.
Thanks, Misha |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed May 23, 2007 3:09 pm |
|
If you don't have any variables in the HTML, you could remove the eval and do something like:
Code: $tmpl_file = "XXXX/XXXX/my_links.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
print $r_file;
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Misha
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed May 23, 2007 6:05 pm |
|
Thanks, Kevin
It does not work without eval though, but works fine with it. Since my goal is just to have it working, I'm leaving this as it is. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Misha
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 24, 2007 10:23 pm |
|
Funny thing. Today I stumbled upon the code that makes me thinking I can just use include statement for this. Any thoughts before I give it a try? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Misha
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 26, 2007 3:03 pm |
|
Yep, it's confirmed. Simple include statement does the trick LOL. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|