EvilLyrics forum
August 12, 2020, 12:41:34 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 2 3 4 »
  Print  
Author Topic: Post To Webpage  (Read 21569 times)
Jayphen
Newbie
*

Karma: 0
Posts: 25


« on: January 19, 2005, 04:27:40 AM »

the tutorial here

http://www.evillabs.sk/evillyrics/faq/faq1.php?faqnr=72

doesn't seem to work. nothing is outputted to the file, and when I try to access 'postlyrics.php' I get a php error on line 5, whether it is commented or not.

any ideas?
Logged

EvilLyrics forum
« on: January 19, 2005, 04:27:40 AM »

 Logged
felipin-sioux
Full Member
***

Karma: -1
Posts: 243


« Reply #1 on: January 20, 2005, 05:00:52 AM »

Hi,

Please take a look here: http://www.evillabs.sk/forum/viewtopic.php?t=969. AVB100 is working on a nice version for this feature..
Logged
AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #2 on: January 20, 2005, 02:47:49 PM »

I experienced the same poý+ Û…¶ïA¯Post To WebpageAVB100AVB100@Hotmail.com140.211.121.227Ágot carried away.

The problem is that '\' will escape the closing quote.

The corrected version would be:
Code:
$out = str_replace('\\','',$text); //we remove backslashes from lyrics


But, then again, there's a nifty little function that's been around since PHP 3 (even earlier than str_replace, introduced in 3.0.6) that will have the desired effect
Code:
$out = stripslashes($text);


Oh, and writing to blog/lyrics.php may not work (if the directory doesn't exist), so you may need to consider that...
Code:
if ( !is_dir('blog') ) { mkdir('blog'); }
or
$fp = fopen('lyrics.php', 'w'); //path to lyrics.php file with writing permission


But I digress.  I've been working on a new version of my scripts (completely re-coded), so the old version has essentially been end-of-lifed, but I would still be happy to send it to you (upon request).  I can't really say when the new version will be available, but it shouldn't be more than a few weeks.
Logged

My ambition in life is to look good on paper
AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #3 on: January 25, 2005, 11:49:35 PM »

I've created a sourceforge project for my plug-in...because I can.

Project information can be found at:
http://sourceforge.net/projects/evilposter/

Or directly download version 1.00 from:
http://prdownloads.sourceforge.net/evilposter/EvilPoster_1.00.zip?download
Logged

My ambition in life is to look good on paper
Jayphen
Newbie
*

Karma: 0
Posts: 25


« Reply #4 on: January 27, 2005, 04:48:43 AM »

excellent Smiley

here's what mine looks like, customized a little..

http://medio-core.com/np
Logged

Jayphen
Newbie
*

Karma: 0
Posts: 25


« Reply #5 on: January 27, 2005, 06:48:44 AM »

edit: oops
Logged

AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #6 on: January 27, 2005, 06:52:09 AM »

You found probably the # ýJ Û‰øA¯Post To WebpageAVB100AVB100@Hotmail.com140.211.121.227Áan my design.  I assume the customizations you made were cosmetic.

I noticed you commented out the admin form...could you let me know why?  (I expect, because it looked shitty and it doesn't do anything too important yet)  Any ideas on how those features could be integrated without being such an eyesore?  I suppose I could put a subtle link to a login page, or I could develop some sort of login where it would just add options for the admin to the index page.  I don't know.

One other thing I've been thinking about, is changing the way past lyrics are listed.  Currently, it shows now playing, past hour, and past 24 hours.  I don't know if it would be better to go by the last # songs played, or some other method.

Anyways, is there any features that you'd like to see?
(Multiple layout options, friendlier setup process, etc.)

Run into any problems with the installation?
(Instructions hard to follow, missing steps, etc.)

Well, I've said more than enough.  Any feedback you can give me would be great, and thanks for downloading.
Logged

My ambition in life is to look good on paper
Jayphen
Newbie
*

Karma: 0
Posts: 25


« Reply #7 on: January 27, 2005, 07:03:27 AM »

I'm trying to make it soiýK Û/„øAÜPost To WebpageJayphenjayphen@gmail.com 203.45.76.23;zes large images down to 300. I thought I had it right, but it didn't work. my first php script ever.. a failure! any ideas?

I took out the admin form because it's no use to anyone but me. it's okay for me to see it, but not anyone else. it looks .. hmm I can't think of the word. hopefully understand despite how vague I am being.

I would prefer to be able to access the admin page directly via /admin.php.

about the way past lyrics are listed, you could perhaps have in the admin.php a few different options. they could include the way it is now, or a specified # of last songs played.

you could also have 2 archive links, one with a list of lyrics by artist (under A, B, C etc) which could also be sorted by album or song title .. and another archive with all songs listened to in the past week, with links to other weeks or months or whatever.

no problems at all with the installation, it was simple as they come.
Logged

AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #8 on: January 27, 2005, 08:23:00 AM »

Well, the first problem sýL ÛÔ–øA¯Post To WebpageAVB100AVB100@Hotmail.com140.211.121.227e have two values and the code isn't likely to be used again on the same page, it is easiest to just program this inline.

This option will be added in the next version.

The following code (which will be implemented in some form in the next version) should be placed somewhere in front of the code that actually outputs the image...
Code:
$imagesize = getimagesize($saved_album_art_url);
if ( $imagesize )
  {
    $maxsize = 300;
    if ($imagesize[0] > $maxsize) {$imagesize[0] = $maxsize;}
    if ($imagesize[1] > $maxsize) {$imagesize[1] = $maxsize;}
  }


Then, the image can be displayed with the following...
Code:
<IMG SRC="'.$saved_album_art_url.'" WIDTH="'.$imagesize[0].'" HEIGHT="'.$imagesize[1].'" ALT="'.$saved_album_name.'">




To patch your code, I would do the following:
Code:
<? function imageResize($saved_album_art_url,$dimension) {

$albumimage = getimagesize($saved_album_art_url);

$width = $albumimage[0];
$height = $albumimage[1];
  if ( $albumimage && ($width>300 || $height>300) ) {
  $width = "300";
  $height = "300";
  }

  if ($dimension=='width') {
  return $width;
  }

  if ($dimension=='height') {
  return $height;
  }

} ?>
and
Code:
<? if ( isset($saved_album_art_url) ){
echo '<A HREF="'.$saved_amazon_url.'" target="_new">
<IMG border="0" width="'.imageResize($saved_album_art_url,'width').'" height="'.imageResize($saved_album_art_url,'height').'"SRC="'.$saved_album_art_url.'" ALT="'.$saved_album_name.'">
</A><br><br>';
} ?>


I find it slightly more cumbersome to use a function in this case...



Some notes on your PHP...

The parameters of a function is for data being passed to a function
Code:
function myFunctionName($parameter, $parameter2)
  {
    $parameter; // 'Anything'
    $parameter2; // 'Something else'
  }

myFunctionName('Anything','Something else');


Variables defined within a function have a limited scope (they are only available within the function itself)  If you try to access those variables from outside the function, they will not be found

Once the script has been told to process as php, using the '<?' or '<?php' tag, it is not necessary to do it again unless it has been closed '?>'

If you're using a limited php segment to output a variable, you need to use an echo, or another print command e.g. <? echo $var; ?>


Anyways, hope this helps.  Happy coding.
Logged

My ambition in life is to look good on paper
AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #9 on: January 27, 2005, 01:47:03 PM »

Released version 1.01
http://sourceforge.net/projects/evilposter/

Now, admin stuff is hidden unless you access '/index.php?admin' or login at '/admin.php' directly.  Also, your time zone and the maximum album art image dimensions (width/height) can be adjusted from the admin panel.

I created most of the browse/search system, but I still have to refine the search method.  Right now, the search just uses a literal (case sensitive) search for the query string in the artist and song title.

The prototype can be viewed here:
http://s94037941.onlinehome.us/search.php
Logged

My ambition in life is to look good on paper
Jayphen
Newbie
*

Karma: 0
Posts: 25


« Reply #10 on: January 28, 2005, 02:12:19 AM »

thanks for the php lesson hehe, I eventually got it working Smiley

I think I might use winmerge to update, I don't want to lose my customisations.

are you going to look into archiving?
Logged

AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #11 on: January 28, 2005, 06:51:58 AM »

I'm trying to think of the best way to allow people like you to customize the pages, and not have to manually update every version...it's an interesting problem.  I've switched most everything to CSS (with a source file), but that still only allows a certain amount of control.  

For pages that are different beyond css styles (as yours is), they'd have to be updated individually for every page, unless I seperated all the different processing parts to seperate scripts called by an iframe or include.  I'll have to give this some thought.

For now, I'd reccomend you keep your current version until there's a major update, and some of this gets sorted out.
Logged

My ambition in life is to look good on paper
AVB100
Jr. Member
**

Karma: 0
Posts: 53


« Reply #12 on: January 30, 2005, 05:21:13 PM »

Another release...
http://prdownloads.sourceforge.net/evilposter/EvilPoster_1.02.zip?download

Changes in 1.02:
  New features
  - Implemented a basic search system
  - Creation of new layouts supported
  - CSS stylesheets can now be created to customize page
  Changes
  - Split control of file management and preferences to two pages
  - Several bugs fixed

With this version, if you upload your current index.php to the /layouts folder you should be able to switch to that format from the admin page.  If the default stylesheets override your formatting, switch the style to Custom, but know that the other pages will lose all their formatting.
Logged

My ambition in life is to look good on paper
Jayphen
Newbie
*

Karma: 0
Posts: 25


« Reply #13 on: January 30, 2005, 10:08:28 PM »

the download link seems to be broken at the moment.
Logged

Jayphen
Newbie
*

Karma: 0
Posts: 25


« Reply #14 on: January 31, 2005, 07:59:44 AM »

okay, downloaded.. it looks good, except 'played in the last hour' doesn't seem to work.

two things, would it possible to make the search function not case sensitive? and also, is there any way you can display the current playing song (and something like, "no lyrics found"), even if evillyrics doesn't find any lyrics?
Logged

EvilLyrics forum
   

 Logged
Pages: 1 2 3 4 »
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines | Calendar EvilLyrics