for AD or Phade mostly, unless anyone else has a suggestion

Locked
User avatar
Pwolf
Friendly Neighborhood Pwaffle
Joined: Thu May 03, 2001 4:17 pm
Location: Some where in California, I forgot :\
Contact:
Org Profile

for AD or Phade mostly, unless anyone else has a suggestion

Post by Pwolf » Thu May 13, 2004 2:35 am

Ok, this is gona sound odd... But please stay with me. This is mostly for AD and Phade.

On my site i have a peice of php that searches for my videos on a server. I have the name of the file in a database and if the code finds the video, it says "Available for Local Download".

Code: Select all

if (@fclose(@fopen("$link$myrow[9]", "r")))
{
printf("<td class='avail' colspan='' valign='bottom'>Available for Local Download</td></tr>");
}else{
printf("<td class='avail' colspan='' valign='bottom'> &nbsp;</td></tr>");
}
Recently i've wanted to add a link to the org pages for my videos also because i can't host all of them and it would be cool if i could just point people to the video pages on the org. So becuase i'm lazy and don't want to add a link or identifying number to each of my videos into the databse, is there a way i can have some code do the work for me and tell me if there is a local link for the video on the org?

Probably not possible (i think o.o), but it doesn't hurt to ask :P


Pwolf

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Thu May 13, 2004 5:10 am

Pfft, if you were truely lazy you wouldn't care to have links to the video profiles. You'd just write:

Code: Select all

if (@fclose(@fopen("$link$myrow[9]", "r"))) 
{ 
printf("<td class='avail' colspan='' valign='bottom'>Available for Local Download</td></tr>"); 
}else{ 
printf("<td class='avail' colspan='' valign='bottom'>Available at <a href="http://www.animemusicvideos.org">AnimeMusicVideos.org</a></td></tr>"); 
}
:roll:

User avatar
Pwolf
Friendly Neighborhood Pwaffle
Joined: Thu May 03, 2001 4:17 pm
Location: Some where in California, I forgot :\
Contact:
Org Profile

Post by Pwolf » Thu May 13, 2004 3:13 pm

Corran Productions wrote:Pfft, if you were truely lazy you wouldn't care to have links to the video profiles. You'd just write:

Code: Select all

if (@fclose(@fopen("$link$myrow[9]", "r"))) 
{ 
printf("<td class='avail' colspan='' valign='bottom'>Available for Local Download</td></tr>"); 
}else{ 
printf("<td class='avail' colspan='' valign='bottom'>Available at <a href="http://www.animemusicvideos.org">AnimeMusicVideos.org</a></td></tr>"); 
}
:roll:
aye, but not all my videos are hosted here on the org. I plan on uploading them all but i wont upload my projects ones (at least not until i feel that it's not wasting the org's space)


Pwolf

User avatar
Eek-1
Joined: Sat Jun 22, 2002 10:06 am
Status: 0xc00000e9
Location: Cyberjaya
Org Profile

Post by Eek-1 » Thu May 13, 2004 4:18 pm

you can write a program that can parse HTML from the Org's Video Info webpage. But it can really slow things down, plus it needs video id or url for reference.

User avatar
Pwolf
Friendly Neighborhood Pwaffle
Joined: Thu May 03, 2001 4:17 pm
Location: Some where in California, I forgot :\
Contact:
Org Profile

Post by Pwolf » Thu May 13, 2004 4:54 pm

Eek-1 wrote:you can write a program that can parse HTML from the Org's Video Info webpage. But it can really slow things down, plus it needs video id or url for reference.
yea, don't need it to be any slower then it already is (not really that slow, but i'd rather not slow it down at all). I guess i could just add the databse fields myself or just add the video's id number and go from there. i hate being lazy :P


Pwolf

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Thu May 13, 2004 5:20 pm

You know, that is a neat idea.

Phade: What are the chances of us being able to write RSS aggregators for .org information?

You could make it a perk for donating members -- I'd pay for that :)

User avatar
rose4emily
Joined: Fri Jan 23, 2004 1:36 am
Location: Rochester, NY
Contact:
Org Profile

Post by rose4emily » Sun May 16, 2004 12:37 am

I know this might sound like a crazy idea, but:

You could copy the hard link to the video profiles to your page/script for each video hosted on the .org. Considering the fact that it takes at least a few hours to make a new video, it doesn't seem unreasonable to spend a minute and half opening a file or two and pasting in a line of text. The links don't seem to move, so it wouldn't need to be a dynamic thing.

Sometimes the best solution is, oddly enough, forgoing programming for a little manual labor (and I'm a Software Engineering major saying this). Not often, but sometimes.
may seeds of dreams fall from my hands -
and by yours be pressed into the ground.

User avatar
Pwolf
Friendly Neighborhood Pwaffle
Joined: Thu May 03, 2001 4:17 pm
Location: Some where in California, I forgot :\
Contact:
Org Profile

Post by Pwolf » Sun May 16, 2004 12:46 am

rose4emily wrote:I know this might sound like a crazy idea, but:

You could copy the hard link to the video profiles to your page/script for each video hosted on the .org. Considering the fact that it takes at least a few hours to make a new video, it doesn't seem unreasonable to spend a minute and half opening a file or two and pasting in a line of text. The links don't seem to move, so it wouldn't need to be a dynamic thing.

Sometimes the best solution is, oddly enough, forgoing programming for a little manual labor (and I'm a Software Engineering major saying this). Not often, but sometimes.
yea... i just like to chalenge my self a little and try new things :P i'm also lazy but like to go the extra mile and spend hours coding something that will probably take the same time to just use a hardlink -_- hardlink seems like it will be the best bet. For my video server, it works well becuase i can't host all my videos so instead of chaning the links everytime i swtich out a video, the code does it for me in a sense :P i'm just gona use hard links.


Pwolf

User avatar
Kalium
Sir Bugsalot
Joined: Fri Oct 03, 2003 11:17 pm
Location: Plymouth, Michigan
Org Profile

Post by Kalium » Sun May 16, 2004 12:49 am

You're lazy. You're a programmer. It's comes with the territory. Remember: Perl was invented by laziness overkill.

User avatar
Pwolf
Friendly Neighborhood Pwaffle
Joined: Thu May 03, 2001 4:17 pm
Location: Some where in California, I forgot :\
Contact:
Org Profile

Post by Pwolf » Sun May 16, 2004 12:56 am

Kalium wrote:You're lazy. You're a programmer. It's comes with the territory. Remember: Perl was invented by laziness overkill.
:lol: good point :P


Pwolf

Locked

Return to “Site Help & Feedback”