Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
sodapops
Newbie
Newbie



Joined: Apr 17, 2008
Posts: 6

PostPosted: Thu Apr 17, 2008 1:17 pm Reply with quote

Hi, i wondered if someone could help me out.

A couple of months back we used to have guy who did the majority of our site work for us, after a silly argumanet all went sour and he no longer had access to our site.

Whilst he was still doing work on our site he shortened a few of the site urls' - im unsure how he did this and have serached through my ftp to find the module he installed to shorten the links.


I cannot find anything to do with either a hack/module - the only thing i can see he's done is create a .htaccess file - in this file are the following:

Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} (themes|images)/
RewriteRule ^(.*)$ $1 [L]



RewriteRule ^(Weblinks.html|Weblinks.htm)/?$ /modules.php?name=Web_Links&l_op=viewlink&cid=2[L]

RewriteRule ^(Downloads.html|Downloads.htm)/?$ /modules.php?name=Downloads [L]

RewriteRule ^(Submitnews.html|Submitnews.htm)/?$ /modules.php?name=Submit_News [L]

RewriteRule ^(Userreviews.html|Userreviews.htm)/?$ /modules.php?name=JReviews [L]
RewriteRule ^(Privatemessages.html|Privatemessages.htm)/?$ /modules.php?name=Your_Account [L]
RewriteRule ^(Contactus.html|Contactus.htm)/?$ /modules.php?name=Contact_Plus [L]
RewriteRule ^(index.html|index.htm)/?$ /index.php [L]
RewriteRule ^(modules.html|modules.htm)/?$ /modules.php [L]
RewriteRule ^(Forums.html|Forums.htm)/?$ /modules.php?name=Forums [L]
RewriteRule ^(Reviews.html|Reviews.htm)/?$ /modules.php?name=LD_Reviews [L]
RewriteRule ^Reviews(|/|index.htm|index.html)/?$ /modules.php?name=LD_Reviews [L]
RewriteRule ^Reviews-([0-9]*).html modules.php?name=LD_Reviews&op=display_category&sid=* [L]
RewriteRule ^Reviews/(.*)/(.*)/(|index.htm|index.html)/?$ /modules.php?name=LD_Reviews&rop=showcontent&cid=$1&id=$2 [L]
RewriteRule ^Reviews/(.*)/(.*)/Page(.*)\.html$ /modules.php?name=LD_Reviews&rop=showcontent&cid=$1&id=$2&page=$3 [L]


Looking at my site url's the only shortened urls are:

- index.html

- Reviews.html (when you click review index within the module page the url reverts back to the old phpnuke one) - also we are not using the standard reviews module we are using one called LD_Reviews which was made through my request for a review module with drop down box & page names.

- Userreviews.html - this is another different review module we use (again not the standard review module that came with phpnuke) - much the same as our main review module the shortened url only appears when you click on the link from our homepage's naviagtion menu.

- Forums.html - only the index page has shortened link.

- Downloads.html - again only the index page has a shortened link

- Contactus.html

- Privatemessages.html (this is the Your_Account index page)

Is it possible to implement the shortylinks hack in to my site with some of the links already being shortened in this way?

Also as our review module uses page numbering/naming along with categories is there a way to shorten these links? This is the main feature of our website so is the most impirtant with regards to having shortlinks.

Sorry about all the silly questions Smile

Thynks in advance for any help
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 926

PostPosted: Thu Apr 17, 2008 11:27 pm Reply with quote

What I am unsure of is how your links were shortened. Were they hard-coded within the code or was some sort of re-write done such as GoogleTap or GT-NExtGEn? If I had to guess, the links were modified in these modules OR a tiny bit of code was added to your header.php to do an ob_start and then in your footer.php to actually pull the buffered output and rewrite just those links.

I am sure what has been done could be un-done and replace by ShortLinks. However, some of the rewrites are different and so links from search engines would definitely get 404's.

What you could do, though, since there do not appear to be many links that are shortened (if the above is indeed the complete list), and you could add 301 redirects in your .htaccess file to inform the search engines of the moves to the new links.

You can see how my links here on this site to see what these might look like.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
sodapops
Newbie
Newbie



Joined: Apr 17, 2008
Posts: 6

PostPosted: Fri Apr 18, 2008 5:09 pm Reply with quote

Hi Montego,
Thanks for the reply,

I have taken a look in my header.php and this is what is written (i presume it's to do with the shortened links):

Code:
define('NUKE_HEADER', true);
require_once("mainfile.php");



function processLinks($matches){
    $url = $matches[1];
    if(strstr($url,'javascript:')){return $matches[0];}
   if(strstr($url,'http')){return $matches[0];}
   if(strstr($url,'www')){return $matches[0];}
   if(strstr($url,'.com')){return $matches[0];}
   $thing = explode('="' ,$matches[0]);
   $output = $thing[0].'="http://www.pcfrags.com/'.$url.'"';
   return $output;
}


function callback($buffer)
{
 
  $buffer = preg_replace_callback('/href="(.*?)"/im', "processLinks", $buffer);
  $buffer = preg_replace_callback('/src="(.*?)"/im', "processLinks", $buffer);
  $buffer = preg_replace_callback('/background="(.*?)"/im', "processLinks", $buffer);
  #$buffer = preg_replace('/href="(.*?)"/im',"href=\"/$1\"", $buffer);
  #$buffer = preg_replace('/src="(.*?)"/im',"src=\"/$1\"", $buffer);
  #$buffer = preg_replace('/background="(.*?)"/im',"background=\"/$1\"", $buffer);
 
  return $buffer;
}

ob_start("callback");



and the footer.php:

Code:
echo "</body>\n</html>";
        ob_end_flush();
   die();
}
   

foot();

?>


Quote:
What you could do, though, since there do not appear to be many links that are shortened (if the above is indeed the complete list), and you could add 301 redirects in your .htaccess file to inform the search engines of the moves to the new links.


Is there a readme file for this action, i know the basics of phpnuke - re-coding is something i have never done - im afraid my phpnuke experience extends to editing files through way of included readme's Sad


It's all a bit new to me since we always had a guy do it for us, apologies for my lack of experience - any help you could give would be greatly apreciated.

Thanks for taking the time to reply to my forum messages.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 926

PostPosted: Sat Apr 19, 2008 2:24 pm Reply with quote

Well, I can honestly say that I have never seen anyone rewrite links in this manner. I just do not see the benefit of shortening the various image URLs, which is also what this appears to be doing.

I am afraid that there is no easy answer here. This is going to take some work to try and convert all of this over to the latest ShortLinks unless you do not care about getting 404s from the Search Engine cached results for a few months. You could have to figure out how to 301 redirect all of these URLs to the new ones...

Sorry to be the bearer of some bad news, but this guy has really done a number on this. This is what I would call a "lazy-tap". Very little SEO value. But, then again, even ShortLinks is questionable on the SEO value. There are more important things one can do to improve upon SERPs such as Dynamic Titles (can get here) and nukeSEO (http://nukeSEO.com).

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
sodapops
Newbie
Newbie



Joined: Apr 17, 2008
Posts: 6

PostPosted: Sat Apr 19, 2008 3:08 pm Reply with quote

Hi Montego,

thanks for the reply.
I have looked in to 301 redirects - but as i have little coding experience - and with none of the tutorials giving very clear instructions on how to perform this action - i wouldn't want to mess around with it.

I presume this is the sort of redirect i would need to perform:

Code:
Redirect 301 /oldpage.html http://www.example.com/newpage.html


But what's the difference between the shortlinks this guy did for our site and the shortlinks your module will output?

I have already installed the dymanic titles hack and find it to be a very useful mod. I am also looking in to dynamic meta tags, image naming and any other little tweaks i can come across to help our sites visibilty.

Ive been looking onto shortened links since we started our PC Hardware review site 15 months ago - but the likes of google-tap and GT seemed very confusing for a newbie phpnuke person. This is why your shortlinks module apealed to me - shame i wont be able to use it due to major lack of coding experience - maybe when i get time in between reviewing pc hardware i can attempt to learn the more in-depth coding aspects of phpnuke.

Thanks for your replies
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 926

PostPosted: Sat Apr 19, 2008 3:27 pm Reply with quote

Well, ShortLinks is built upon GT-NExtGEn which was built upon GoogleTap.

You can compare the different links by looking at your links vs. what I have here on this site. Wink

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
sodapops
Newbie
Newbie



Joined: Apr 17, 2008
Posts: 6

PostPosted: Sun Apr 20, 2008 6:02 pm Reply with quote

Hi Montego,
The difference between the links you have on your site and the pones on mine are aprt from the index.html they all begin with a capital letter i.e your download is written downloads.html mine is writtem Downloads.html.

If there was a clear readme/tutorial out there that displayed the .htacess file with a 301 redirect in there it may give me some idea of to do it myself.
As i have learned from phpnuke, even a mis-placed ; can cause errors - so with my lack of experience i can't seeme pulling it off first time Smile

I really apreciate you taking the time out to read/reply to my forum posts.

It's a shame this guy did what he did - i obvioulsy trusted/paid the wrong person to admin my site - i won't be making that mistake again!!! At the time he did it i believed he had good intentions, and due to the nature of my site improving pageranks for me means more review items and better prizes for our monthly prize giveaways.

Like you, we like to give something back to the readers/visitors of our website, if it wasn't for people/sites like this one i wouldn't be able to offer my readers these great things and have a nice looking website.

Thanks for all your help - this is one hack that if i want bad enough i will have to go it alone Smile
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 926

PostPosted: Mon Apr 21, 2008 7:51 am Reply with quote

I am not aware of any single tutorial. I had to do a bunch of searching on the web to piece some things together. However, I did have a few links awhile back that I needed to get the search engines to "know" that had changed, so here are a couple of examples:

RewriteRule ^ftopic-post-([a-z]*)-(p|t)([0-9]*).html$ ftopic-$1-$3.html [R=301,L]
RewriteRule ^backend.php feeds-1-rss20.xml [R=301,L]
RewriteRule ^forumsbackend.php feeds-2-rss20.xml [R=301,L]

There are other ways to do this, but since mod_rewrite is already active on my site (and yours), it just makes the process very easy. Note the R=301, that is what produces the 301 code to the SE crawlers to know to make the change in their index. Wink

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
sodapops
Newbie
Newbie



Joined: Apr 17, 2008
Posts: 6

PostPosted: Fri Aug 01, 2008 6:42 pm Reply with quote

Hi,
I know this topic is a few months old, but rather tha opening up a new topic i thought i'd post my question here (since it's relevant to my original question).

Basically if you have read the topic so far, you will see that i want to implement shortlinks in to my website, however a guy who used to admin our site some months back decided he was going to shorten just a select group of our urls the lazy way.

As i have an incredibly heavy work schedule plus the time it takes to write a review, i was wondering if there was anyone out there who could help me to implement the shortlinks hack on my site?

I would be willing to pay for this service, however please bear in mind that our site doesn't earn any revenue and so the fee would be paid out of my own pocket.

The implementation of this hack would also require the 301 redirects as discussed by montego within this thread.

If anyone has the time to help me do this and would like to earn a little cash, you can pm me through these forums.

P.S to Montego - please feel free to remove this post if i'm breaking any posting policies and accept my sincere apologies - i didn't see any custom work forum board to post this on Shocked

Thanks
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 926

PostPosted: Fri Aug 01, 2008 6:56 pm Reply with quote

No problem at all. I wish that I had the time to help you this weekend, but unfortunately have some important deadlines to meet.

Check back with me in a couple of weeks, though, and I might be able to fit you in. If I can remember, too, I'll ping you.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
sodapops
Newbie
Newbie



Joined: Apr 17, 2008
Posts: 6

PostPosted: Fri Aug 01, 2008 7:02 pm Reply with quote

Hi Montego,
Thanks for your reply - when all other sites fail to reply - i can guarantee Montego Scripts to answer my forum topics - and within minutes!!! Smile

Theres no real rush to implement the shortlinks to my site - i'm am real busy with reaview publications (writing and testing) - i'm also going to go through my site and remove any useless modules/addons 6this guy added without my knowledge - long weekend for me too - i feel your pain!!!

On a side note - i do a few custom modules - not sure how easy these would be to tap?

You will have to pm me an estimated price you would charge for helping me do this - then when you do get some time i can make sure funds are available immediately Smile
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 926

PostPosted: Fri Aug 01, 2008 7:13 pm Reply with quote

No problem. When the time comes, I'll have to review your site a bit just to make sure I can give you a tighter estimate. I won't disclose my going rate in public, but, there is always room for negotiation. Wink
 
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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
Forum - Join the conversation on the Thoughts.com forums
Search Engine Ranking - Improve your SEO services. Premium Web content, intelligent links, quality optimization & competitive search engine placement. You deserve Better Rankings!
Executive Resumes - providing complimentary resume analysis
PhpNuke Themes
Lobo Links Web Directory
linear-bunch
linear-bunch