Webmastersite.net
Register Log In

Migrating from PHPLD to WSN
Migrating from PHPLD to WSN

Comments on Migrating from PHPLD to WSN

tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
Posted Nov 29, 2006 - 9:06 AM:

Hi,

I want to change one directory I have running phpld to wsn links there are some features I still didn’t manage to implement on WSN.

- I want the links to be inside the description, but I want it done automatically, a new field is added that asks the submitter for SEO the target keyword then the script pickup’s this word and replaces on the description with a live link automatically.

- I want rotating sitewide featured links on the footer.

- Is there any way to move categories and links database from phpld to WSN automatically?

Can anyone help?
Cheers
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 29, 2006 - 7:20 PM:

1. What exactly does "inside the description" mean? A phrase in the description links to the url? I suppose you could add a link field phrase, then display the description using <?php echo str_replace('{LINKPHRASE}', '<a href="{LINKURL}">{LINKPHRASE}</a>', '{LINKDESCRIPTION}'); ?> though it might be better suited as a new function in classes/onelink.php, since the above will break when the description contains an '.

2. Use a toplist. If only certain links are featured, add a link field 'featured' and set the toplist to only show where featured='yes'

3. Not at present, but if someone would like to send me the phpld sql I'll have a look at adapting one of the existing sql importers to it.
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
1 of 1 people found this comment helpful
Posted Nov 30, 2006 - 8:03 AM:

1. Working fine thanks
2. It as to be randon featured links, can you do a MOD to do this?
3. I already send you the SQL Dump
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 02, 2006 - 2:11 AM:

2. Admin Panel -> Customizations -> Toplist Generator, select to sort by random order. If 'featured' is a link type rather than a new field, use the toplist condition type='featured'
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
Posted Dec 02, 2006 - 9:14 PM:

Looking good, randon featured links working now
How I truncate the descriptions on PHPLd I do like this.
{$link.DESCRIPTION|truncate:170}

Is there any variable that displays the total number of featured links a category as? And the total number of regular links?

How I put the featured links to subtract a value by year and not a value by day like the default.

How is the importer to phpld database coming along?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 03, 2006 - 1:21 AM:

See scripts.webmastersite.net/w...les/Link_Variables-10.html for link template variables, description is near the top.

Is there any variable that displays the total number of featured links a category as? And the total number of regular links?

See scripts.webmastersite.net/w...Category_Variables-11.html ("To show the total of each type within a category, use {REGULARTOTAL}, {OTHERTYPETOTAL} etc.")

How I put the featured links to subtract a value by year and not a value by day like the default.

If it's link type sponsorship that's an option on the sponsorship settings page.

The importer is complete: scripts.webmastersite.net/w...snlinks/?section=resources
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
Posted Dec 03, 2006 - 3:19 PM:

The script for migration from phpld works fine only one little bug, if the link is inactive or pending it shows as active on the migrated database.

I also see that WSN doesn’t use META Tags any special reason for this?, my opinion that they are real necessary for SEO.

I Searched and not found the year options for sponsored links, only the option to put 365 days comes to mind smiling face.

At phpld I have a admin mod that fetches a snapshot from a online service (for example: http://www.webshotspro.com/ or other) for all the links and creates a local cache at /snapshot/{link-id}.gif is possible to do something similar on WSN.

Thanks for the fantastic support.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 04, 2006 - 3:41 PM:

Meta tags can be used, and there's a headers area for categories designed for them along with a spot in the admin panel for default meta tags. If you mean distinct meta tags for each link, that can be done with a custom field (I believe this is discussed in the intro manual pdf), though I don't see how meta tags are of much importance in this day and age.

The importer doesn't bring over phpld meta tags because they're in a different format (without the full <meta...> enclosure) which would've made it a pain to convert.

If you want to handle leap years you'll have to change to 366 every 4 years.

As for web thumbnails, you can use thumbshots.org though there's no local cache: scripts.webmastersite.net/w...tsorg_integration-217.html

If you have a dedicated server and good working knowledge with it, I have an option ready for WSN Links to create and cache its own web thumbnails (on linux servers) but I can't figure out how to let apache/php's user create an X-Windows session as is necessary to run gnome-web-photo. It would be nice to get that working. It also requires having X and GTK installed of course, but I was testing on my desktop where I know they work so the problem had to be with apache's user setup -- I know the shell command I was using was right too, because it works when I run it as my own user, just not run within PHP, where it returns "cannot open display: (null)".
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
Posted Dec 04, 2006 - 4:40 PM:

Google is using Meta-tags again for creating descriptions on the searches and for the duplicated content filter, so now they are important again.

Any way to put the system on 1 year and not 365 days?

I already know this real time thumbshots, I whant a cached version, I am doing it manually now, saving the thumbshots on “/snapshot/”

The idea to create your own snapshots is cool, probably you can do it without X front-end, the best scenario is some kind of graphic library that makes this with php and apache.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Dec 04, 2006 - 5:44 PM:

Previously I hadn't been able to find anything that'd run without X, but on further searching now http://www.boutell.com/webthumb/ looks promising. It does require "the Xvfb virtual framebuffer X server" but that's more reasonable than X itself. I'll play around with it.

Edit: No luck, I made a test file
<?php
$result = shell_exec("/var/www/webthumb http://www.webmastersite.net/ | pnmscale -xysize 100 100 | pnmtojpeg > test.jpg");
echo $result;
?>
but all it does is create an empty, 0 byte test.jpg.

Doesn't work from the shell either:
pgk@pgk-desktop:~$ perl webthumb http://www.boutell.com/ | pnmscale -xysize 100          100 | pnmtojpeg > thumb.jpg
error opening security policy file /usr/lib/xserver/SecurityPolicy
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
FreeFontPath: FPE "/usr/share/fonts/X11/misc/" refcount is 2, should be 1; fixin g.
error opening security policy file /usr/lib/xserver/SecurityPolicy
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
FreeFontPath: FPE "/usr/share/fonts/X11/misc/" refcount is 2, should be 1; fixin g.
error opening security policy file /usr/lib/xserver/SecurityPolicy
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
Xlib: extension "XInputExtension" missing on display ":2.0".
Failed to get list of devices
Error: No running window found.
Error: Failed to send command: 509 internal error
xwdtopnm: writing PPM file
pgk@pgk-desktop:~$


I guess I'm doing something wrong.

Later edit: Got it working from the shell now, but it still doesn't work from PHP, and gives no error.
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
#11 - Quote - Permalink
Posted Dec 05, 2006 - 2:30 PM:

Hi,
The migration makes some kind of error, the category lists on the submit and edit page don’t work anymore always shows “top level” you can see it at http://www.redpines.org/
Any ideas?
Thanks
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
#12 - Quote - Permalink
Posted Dec 05, 2006 - 2:56 PM:

I want a simple scenario of regular permanent links ($30) and 1 year featured links ($50) how can I implement this easily?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#13 - Quote - Permalink
Posted Dec 06, 2006 - 12:14 AM:

You have more than 400 categories, which is too many for the selector if you want to parse permissions: scripts.webmastersite.net/w...nally_Large_Sites-189.html

scripts.webmastersite.net/w.../Configuration/Sponsorship
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
#14 - Quote - Permalink
Posted Dec 06, 2006 - 7:23 AM:

Created

<?php
$notypetotals = false; // make true if you have tens/hundreds of thousands of links in a category and want to speed things by not calculating the number of each type
$overridesafety = true; // make true if you want to try to use the category selector on the suggest page with more than 400 categories
$ignorepermissions = true; // use along with overridesafety to make the category list be a plain list allowing everyone to submit to any category... this should make a list of thousands work
$dontcachesubcats = false; // make true for real-time calculation of subcategory data, at risk of turning server into smoldering pile of rubble
$pathtoconfig = ''; // change if you place your config.php somewhere else
?>

still same thing, only “top level” shows.
tdz
Member

Usergroup: Customer
Joined: Oct 06, 2006

Total Topics: 5
Total Comments: 19
tdz
#15 - Quote - Permalink
Posted Dec 06, 2006 - 7:33 AM:

Other strange thing going on,
If you go for example to http://www.redpines.org/Computers_and_Internet
Doesn’t show any subcategory :P

Also how I configure to have the trailing “/” at the end of url
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.