PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Misha
Worker
Worker


Joined: Jul 30, 2006
Posts: 203
Location: McLean, VA

PostPosted: Tue May 22, 2007 11:32 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue May 22, 2007 12:52 pm Reply with quote Back to top

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.
View user's profile Send private message
Misha
Worker
Worker


Joined: Jul 30, 2006
Posts: 203
Location: McLean, VA

PostPosted: Tue May 22, 2007 1:21 pm Reply with quote Back to top

No surprise the author of nukeSEO is looking into this Smile

As I realize after a year of struggling for traffic, nuke is SOOOOOOO seo unfriendly Sad

Anyways, thanks for explaining the code - I learn something every time I talk to you, guys. Very Happy

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
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Wed May 23, 2007 3:09 pm Reply with quote Back to top

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;
View user's profile Send private message
Misha
Worker
Worker


Joined: Jul 30, 2006
Posts: 203
Location: McLean, VA

PostPosted: Wed May 23, 2007 6:05 pm Reply with quote Back to top

Thanks, Kevin Smile
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.
View user's profile Send private message Visit poster's website
Misha
Worker
Worker


Joined: Jul 30, 2006
Posts: 203
Location: McLean, VA

PostPosted: Fri Aug 24, 2007 10:23 pm Reply with quote Back to top

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?
View user's profile Send private message Visit poster's website
Misha
Worker
Worker


Joined: Jul 30, 2006
Posts: 203
Location: McLean, VA

PostPosted: Sun Aug 26, 2007 3:03 pm Reply with quote Back to top

Yep, it's confirmed. Simple include statement does the trick LOL.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum