Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.218
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Quick php question (i suck at php)
Quick php question (i suck at php)

5 Replies / 3456 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Hacks n Mods

View previous topic :: View next topic


J2897
Reputation: 482.4 Add RepSubtract Rep
Local time: 7:15 PM
Location: Manchester UK
blank.gif

Noob
Noob

0.01 posts per day
Medals: 0

Joined: Aug 26, 2007
Last Visit: 03 Aug 2009
Posts: 12
Points: 131 

Post Quick php question (i suck at php) Posted: Mon Sep 03, 2007 4:55 pm

OK, How do I turn this...
Code:
<a href=modules.php?name=Video_Stream&amp;page=watch&amp;id=10>


Into this...
Code:
<a href="modules.php?name=Video_Stream&amp;page=watch&amp;id=10">


Using this...
Code:
$content .="<a href=modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id'].">


Thanks, J.
 

Nuke FTW!!! :D  
View user's profileSend private message Reply with quote

J2897
Reputation: 482.4 Add RepSubtract Rep
Local time: 7:15 PM
Location: Manchester UK
blank.gif

Noob
Noob

0.01 posts per day
Medals: 0

Joined: Aug 26, 2007
Last Visit: 03 Aug 2009
Posts: 12
Points: 131 

Post Quick php question (i suck at php) Posted: Mon Sep 03, 2007 5:32 pm

NVM, ignore that one. That was too easy. Devil

The answer was this...
Code:
$content .="<a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."\">


---------------------------------------------------------------------------------------------------------------------

Now, How do I turn this...
Code:
<img src=http://www.peelthaiboxing.co.uk/modules/Video_Stream/images/thumbnails/DamienWallworkEnglishTitleFight.jpg border="0" width=100 alt=Damien Wallwork - English Title Fight - Horwich></a>


Into this...
Code:
<img src="http://www.peelthaiboxing.co.uk/modules/Video_Stream/images/thumbnails/DamienWallworkEnglishTitleFight.jpg" border="0" width=100 alt="Damien Wallwork - English Title Fight - Horwich"></a>


Using this...
Code:
$content .="<img src=".$row['imgurl']." border=\"0\" width=100 alt=".$row['vidname']."></a>\n";
$content .="<br><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."\">".$row['vidname']."</a><br>";


Thanks, J.
 

 
View user's profileSend private message Reply with quote

J2897
Reputation: 482.4 Add RepSubtract Rep
Local time: 7:15 PM
Location: Manchester UK
blank.gif

Noob
Noob

0.01 posts per day
Medals: 0

Joined: Aug 26, 2007
Last Visit: 03 Aug 2009
Posts: 12
Points: 131 

Post Quick php question (i suck at php) Posted: Mon Sep 03, 2007 5:43 pm

This is the whole block in case I missed a bit. I'm basically trying to put "quotes" around my URL's etc, so to pass the HTML validation...

Code:
<?php
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify     //
// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License, or        //
// (at your option) any later version.                                      //
// ------------------------------------------------------------------------- //

//----------------------------------------//
//Block by Dawg//
//Based on The Random video block by Q @ www.3c0x1.net //
//----------------------------------------//


//Side Block to show Latest Video//

if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}
define('NO_HEADER', true);
global $prefix, $prefix, $db;
$limit = 1;
$content = "<p align=\"center\">";
//Latest Added
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream WHERE request=0 ORDER BY id DESC LIMIT $limit");

while ($row = $db->sql_fetchrow($result)) {
  $imsrc = $row['imgurl'];
        if ($row['vidname'] != '') {
            $thumb_title = $row['vidname'];
        } else {
            $thumb_title = substr($row['imgurl'], 0, -4);
        }
      $content .="Latest Added Video\n";
      $content .="<a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."\"><img src=".$row['imgurl']." border=\"0\"

width=100 alt=".$row['vidname']."></a>\n";
      $content .= "<br><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;id=".$row['id']."\">".$row['vidname']."</a><br>";

}
?>
 

 
View user's profileSend private message Reply with quote


J2897
Reputation: 482.4 Add RepSubtract Rep
Local time: 7:15 PM
Location: Manchester UK
blank.gif

Noob
Noob

0.01 posts per day
Medals: 0

Joined: Aug 26, 2007
Last Visit: 03 Aug 2009
Posts: 12
Points: 131 

Post Quick php question (i suck at php) Posted: Mon Sep 03, 2007 6:02 pm

This is what the source code is currently giving out...
Code:
<table border="0" cellpadding="0" cellspacing="5" bgcolor="#FF0000" width="160">
<tr valign="top"><td bgcolor="#3399FF">
<p align="center">Latest Added Video
<a href="modules.php?name=Video_Stream&amp;page=watch&amp;id=10"><img src=http://www.peelthaiboxing.co.uk/modules/Video_Stream/images/thumbnails/DamienWallworkEnglishTitleFight.jpg border="0" width=100 alt=Damien Wallwork - English Title Fight - Horwich></a>
<br><a href="modules.php?name=Video_Stream&amp;page=watch&amp;id=10">Damien Wallwork - English Title Fight - Horwich</a><br>
</td></tr></table>
 

 
View user's profileSend private message Reply with quote

Ped
Reputation: 93.3 Add RepSubtract Rep
votes: 37
Local time: 7:15 PM
Location: Great British Empire
uk.gif

Site Founder
Site Founder

1.82 posts per day
Medals: 2 (View more...)
Forums MoD (Amount: 1)
Theme Guru
Theme Guru
Joined: Nov 13, 2006
Last Visit: 24 May 2012
Posts: 3669
Points: 191761 

Post Re: Quick php question (i suck at php) Posted: Mon Sep 03, 2007 6:26 pm

Shop Purchases:
Clan Roster 2.0 · Bad Company 2 Vietnam Xtreme Theme

Why not just use the block creator tool here http://www.clan-themes.co.uk/php-nuke-tools-Block.html

once you have the code place it inside a file called block-YOURNAME.php

replace the YOURNAME with the name you want the block, do not have spaces like YOUR NAME it wont work .... if you want spaces use YOUR_NAME

Hope that helps....

I know some times that block creator might miss one or two tiny snippits so if it doesnt look right attatch the block here
 

 
View user's profileSend private messageSend e-mail Reply with quote

J2897
Reputation: 482.4 Add RepSubtract Rep
Local time: 7:15 PM
Location: Manchester UK
blank.gif

Noob
Noob

0.01 posts per day
Medals: 0

Joined: Aug 26, 2007
Last Visit: 03 Aug 2009
Posts: 12
Points: 131 

Post Quick php question (i suck at php) Posted: Mon Sep 03, 2007 10:19 pm

Ah nice, I'll use that next time I create a block. Well I finally reached my goal at long last. The main page is now fully W3C compliant...
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.peelthaiboxing.co.uk%2F

Thanks guys, J. Smiley
 

 
View user's profileSend private message Reply with quote

Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Hacks n Mods


 
5 Replies / 3456 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
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
You cannot attach files in this forum
You can download files in this forum