Jump to content
Sign in to follow this  
VJ

[Contribution] Links Manager for osC v1.00

Recommended Posts

i'm hoping someone can spot what i'm doing wrong.

 

i'm trying to get links_submit.php to see if the user has a link to my site BEFORE throwing a success message. this (in my opinion) is a good way to avoid wasting your time logging into the admin panel for the undesirables' links which are only going to be deleted anyway...

 

i put this in the top of links_submit.php after $process = false;

but it still goes through with the success page even though i'm entering nonexistant domains

This is already an option in the latest version.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites
This is already an option in the latest version.

 

Jack

i did a fresh install of my entire link directory and it still let me submit nonexistant url's as both the link and the reciprocal link

 

the only option i was able to find in the admin was "reciprocal required?" and if not, the reciprocal box disappears.. is this supposed to actually scan the reciprocating page for the link phrase?

Share this post


Link to post
Share on other sites

No, that option will remove the need for the other site to have your link listed at all, which is not what you want. When I said it was already an option, I didn't mean an option in admin. I should have said it is already a feature. If someone tries to add a link and the reciprocal link doesn't exist, the submission should fail.

 

Jack

Share this post


Link to post
Share on other sites

Thank you for this great contribution, however in the admin section i have the following errors:

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/royal/public_html/admin/includes/filenames.php:117) in /home/royal/public_html/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/royal/public_html/admin/includes/filenames.php:117) in /home/royal/public_html/admin/includes/functions/sessions.php on line 67

 

Can anyone help please???

Share this post


Link to post
Share on other sites
If someone tries to add a link and the reciprocal link doesn't exist, the submission should fail.

what part of the code / page uses this? i must be missing something on one of my pages so i would like to manually check for the code in the designated page(s) to make sure i don't have part of the old install still running.

Share this post


Link to post
Share on other sites
Thank you for this great contribution, however in the admin section i have the following errors:

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/royal/public_html/admin/includes/filenames.php:117) in /home/royal/public_html/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/royal/public_html/admin/includes/filenames.php:117) in /home/royal/public_html/admin/includes/functions/sessions.php on line 67

 

Can anyone help please???

That is a common error related to php. You will run across it occasionally. It means, usually, that you have an extra space at the end of the indicated file (filenames.php in this case). You need to edit the file to remove that. Search the forums for "header already sent" if you can't get it to work.

 

Jack

Share this post


Link to post
Share on other sites
what part of the code / page uses this? i must be missing something on one of my pages so i would like to manually check for the code in the designated page(s) to make sure i don't have part of the old install still running.
Take a look in the links.pp file, in the top section. I don't have access to my files right now but the line starts off something like
if (CheckURL(...

 

Jack

Share this post


Link to post
Share on other sites

I am sorry to bug you Jack as I know you are way busy. I just downloaded the latest version as per your suggestion several pages back. I am reading the instructions for upgrading from 1.10 to 1.14.

And I have a few questions:

 

1 - Step 1: I understand the need to change those numbers. However, since I am not very savvy in myphpadmin, I need some basic instructions. Do I copy and paste that WHOLE thing into one of the windows in phpadmin?

 

2 - Step 9: Upload all of the included files - Does this overwrite any of the files I have from v1.10? I mean, there are A LOT of files in the v1.14 contribution and I am sure many of those were ones I installed in v1.10. Right? Or am I missing something obvious?

 

Replacing codes in files I'm fine with. It's just anything to do with myphpadmin and I'm lost. I don't go in there unless I desperately have to and thus far that's only been to install a contribution. I'm totally lost in there and no tutorial I have seen online speaks in layman's terms to us phpadmin newbies.

 

Again, sorry for the inconveniences in these questions.


26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites

OK, this may be a little confusing but hang in there. First off, to see how to use phpmyadmin, see this thread.

 

Now, using the above as a guide, go into phpmyadmin, select your database and then click on the SQL tab. You will see a white box there. Copy the following and paste it into that box and then click go.

CREATE TABLE links_featured (
links_id int not null auto_increment, 
date_added datetime, 
expires_date datetime,  
PRIMARY KEY (links_id));

CREATE TABLE links_check (
links_id int not null auto_increment, 
date_last_checked datetime, 
link_found tinyint(1) NOT NULL, 
PRIMARY KEY (links_id));

ALTER TABLE links ADD links_category_suggest varchar(32) NULL;

Now, upload the file named links_db_update.php in your root directory and run it by going to www.yoursite.com/links_db_update.php. That will remove all of your current link setting in the configuration table and replace them with a new set. This won't hurt anything other than you will need to go into admin->configuration->Links and set up the options as you want them. This is much easier than trying to change the ID's as mentioned in the update file.

 

Once the above it done, your database should be updated properly. As for uploading files, all of the files being uploaded at Links Manager files. So they won't do any damage unless you have altered those files to fit your site in some way. This may be the case if you have a non-statndard look to the site. in that case, you will need to compare the files that go into the root of the shop. The rest can just be uploaded. Of course, you should always back up just in case.

 

Jack

Share this post


Link to post
Share on other sites

Jack,

 

Thank you for helping with this.

 

1 - I copy/pasted the above code into myphpadmin and got a success message.

 

2 - I uploaded the update.php file to my root directory and ran it. I got the following messages:

 

Warning: main(includes/application_top.php): failed to open stream: No such file or directory in /home/xxxxxxxx/public_html/links_db_update.php on line 13

 

Warning: main(includes/application_top.php): failed to open stream: No such file or directory in /home/xxxxxxxx/public_html/links_db_update.php on line 13

 

Fatal error: main(): Failed opening required 'includes/application_top.php' (include_path='/usr/local/cpanel/3rdparty/lib/php/:.') in /home/xxxxxxx/public_html/links_db_update.php on line 13

 

This is my line 13 in application_top.php:

// start the timer for the page parse time log
 define('PAGE_PARSE_START_TIME', microtime());

Edited by Moonlight

26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites

Never mind about the code I provided about my application_top.php....I need to learn to read error messages.....it was line13 of the links_db_update.php it was referring to which is the requires includes/application_top.php, which is obviously a good file cause my store is using it with no worries.

 

I do not have a template or any other hack. The last contribution I did was your Dynamic Sitemap and the store is running just fine after doing that. So, I don't think there's anything wrong with the application_top.php file.

 

Update: On a lark, I moved the links_db_update.php file to my catalog root (www.mysite.com/catalog/...) and voila! Links configuration settings successfully updated!!!

 

Ok, off to the next steps.......

Edited by Moonlight

26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites

Hi there!

 

I have a problem... the link in the e-mail that is sent out after approval is not the correct one.... for eg:

 

Dear Mr. Y,

 

The status of your link at Magic Senses has been updated.

 

New status: Approved

 

Your link can be found on our site on the following page:

 

https://www.mywebsite.com/Directories-links-8.html

 

Please reply to this email if you have any questions.

 

The correct link is: http://www.mywebsite.com/links.php/lPath/13 ....

If anyone has any idea why this happens and how I can correct it, please reply.

Thank you!

Share this post


Link to post
Share on other sites

Please see the documentation for the reason for that. The link should work for you. If not, you can install the Ultimate SEO contributiion, which is a good idea anyway, or change the code to not format it that way.

 

Jack

Share this post


Link to post
Share on other sites
Please see the documentation for the reason for that. The link should work for you. If not, you can install the Ultimate SEO contributiion, which is a good idea anyway, or change the code to not format it that way.

 

Jack

 

hi, Jack!

I have Ultimate SEO Urls installed.. :(

Share this post


Link to post
Share on other sites

Check to be sure you have this line in your .htaccess file

RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

It allows the links for Links Manager to be rewriten.

 

Jack

Share this post


Link to post
Share on other sites
Check to be sure you have this line in your .htaccess file
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

It allows the links for Links Manager to be rewriten.

 

Jack

 

Thank you, Jack! That solved the problem!

Share this post


Link to post
Share on other sites

Do you mean the links have hhtps? Do you have ssl enabled for your whole site?

 

Jack

Share this post


Link to post
Share on other sites

No. Here is what happens:

the https appears only in the link that is sent in the approval e-mail. I do not have SSL enabled for my whole website.... I may be wrong...

 

There is another thing that I've noticed... Ultimate SEO URLs contribution does not seem to be enabled on my "links" pages on the website... but it works in my approval e-mail... :'( :blink: ... and on the rest of my website...

 

Do you have any idea how I can make Ultimate SEO urls work on my links pages?

 

Thank you so much for your time!

 

S.

 

P.S. My website: Magic Senses

Share this post


Link to post
Share on other sites

There was an update to Ultimate SEO prior to the current On-The-Fly version that was meant to enable Links Manager. As far as I know, the code I provided is the only change but there may be more so you may want to download that version and update your files. As for the https, the code uses the HTTP_CATALOG_SERVER define in admin/includes/configure.php to get that. If oyu have it set to https, then that is where it is coming from.

 

Jack

Share this post


Link to post
Share on other sites
Check to be sure you have this line in your .htaccess file
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

It allows the links for Links Manager to be rewriten.

 

Jack

 

I have two .htaccess files. One at www.mysite.com (root) and one at www.mysite.com/catalog/ (store).

Is my assumption correct in that the above code should be in the store level .htaccess?

 

I installed the latest Ultimate SEO URL last night.


26 contributions installed - - And counting ....

 

Just want to take this time to extend my appreciation to everyone who have patiently answered my questions over the months of working on my site. I hope to be able to "pass it forward" and help new folks.

Share this post


Link to post
Share on other sites

Yes, that code goes in the .htaccess file that is in your store root (catalog/).

 

Jack

Share this post


Link to post
Share on other sites

thank you jack, turns out everything was going good -- but i had the links.php functions file as the original!

 

 

for people that are having the same problem i was several pages back about landing on https:// .... /links_submit_success.php after adding a link

 

in links_submit.php look for:

tep_redirect(tep_href_link(FILENAME_LINKS_SUBMIT_SUCCESS, '', 'SSL'));

 

change to:

tep_redirect(tep_href_link(FILENAME_LINKS_SUBMIT_SUCCESS, '', 'NONSSL'));

 

 

 

and for anyone that wants to have the link details emailed to them instead of the generic "a link was submitted. to be approved" message... look for:

$name = $links_contact_name;

 

add below:

$adminstuff = 'Title: '. $links_title."\n".'URL: '.$links_url."\n".'Description: '.$links_description."\n".'Reciprocal: '.$links_reciprocal_url."\n".'Email: '.$links_contact_email."\n\n".'IP: '.$_SERVER["REMOTE_ADDR"]."\n".'Browser: '.$_SERVER["HTTP_USER_AGENT"]."\n".'Host: '. $_SERVER["REMOTE_HOST"];

 

 

look for:

$newlink_subject

 

modify the line to ADD $adminstuff, so it looks similar to:

$newlink_subject = sprintf($adminstuff, $links_url, $RECIPROCAL);

(yours may be different)

 

 

the resulting email:

Title: Website Title

URL: http;//someurl.com

Description: a description of the submitted site

Reciprocal: http;//someurl.com/links

Email: someemail@email.com

 

IP: x.x.x.x (submitter's ip address)

Browser: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508

Firefox/1.5.0.4

Host: blablabla.myisp.com

 

 

 

i copied over only the php source of the new contribution version to preserve my custom layout, so some of these features jack may have already added and i not noticed, but if it interests you give it a try :)

Share this post


Link to post
Share on other sites

Hello,

 

I added the links to my site, all this new to me. After I finished I got this message, can you tell me how to correct it? I sure hate to start over again, it was a lot of work. Help!!!

 

1146 - Table 'ccgeyer_osc1.links_status' doesn't exist

 

select links_status_id, links_status_name from links_status where language_id = '1'

Share this post


Link to post
Share on other sites

did you run the sql statement to install the tables to the database?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×