Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
ryan333
New Member
New Member



Joined: Mar 26, 2014
Posts: 17

PostPosted: Wed Mar 26, 2014 1:57 am Reply with quote

My site is pureevilclan.com
We are a gaming clan (bf4) if anyone is interested check us out!
I have the latest version of php nuke

Anyways If you view my site the teamspeak 3 viewer is out side of the block.
Image
Image

also my banner needs to be in the block but is out of it or i need to find out how to just use the img code in the home page news section which i rather do

code below is for ts3 viewer
<?php
echo "<div id=\"ts3viewer_1039734\" style=\"width:; background-color:;\"> </div>\n";
echo "\n";
echo "<script type=\"text/javascript\" src=\"http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js\"></script>\n";
echo "\n";
echo "<script type=\"text/javascript\">\n";
echo "<!--\n";
echo "var ts3v_url_1 = \"http://www.tsviewer.com/ts3viewer.php?ID=1039734&text=fa0202&text_size=12&text_family=1&js=1&text_s_weight=bold&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_s_color_h=525284&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=underline&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_i_color_h=525284&text_i_weight_h=normal&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=underline&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_c_color_h=525284&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=underline&text_u_weight=bold&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_u_color_h=525284&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none\";\n";
echo "ts3v_display.init(ts3v_url_1, 1039734, 100);\n";
echo "-->\n";
echo "</script>\n";
?>



code below is for the banner

<?php
echo "<a target=\"_blank\" href=\"https://imageshack.com/i/0rdapzxj\"><img src=\"http://imagizer.imageshack.us/v2/xq90/27/dapzx.jpg\" border=\"0\"></a>\n";
?>
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Wed Mar 26, 2014 7:19 am Reply with quote

Apart from the fact you should not be using php-nuke (it's not safe and you are putting your website and possibly everyone elses on the server at risk), there is something wrong with the actual theme itself.
Although there are some fundamental errors with some of the inline styling elements (e.g. marginheight, marginwidth etc are not valid) I think the root of the problem is you have some table cells (TD) that are not wrapped in a row (TR) and I think this is what is causing the layout to go awry.
I have no idea where the code is in your theme, so you'll just have to use the W3C markup validator to help you [ Only registered users can see links on this board! Get registered or login! ]
If you type in your web address and check the "show source" option, it will show you where the error is in the code.
 
View user's profile Send private message Send e-mail
ryan333







PostPosted: Wed Mar 26, 2014 10:45 am Reply with quote

What Should I wuse instead of nuke?
 
ryan333







PostPosted: Wed Mar 26, 2014 11:24 am Reply with quote

Also could you elaborate a little more on why its not safe? please and thank you!
 
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Wed Mar 26, 2014 11:57 am Reply with quote

ryan333 wrote:
What Should I wuse instead of nuke?


There exist a CMS with the name RavenNuke. Its save, fast, modular, looks like Nuke but with many security fixes, a lot of new features without to loose the real Nuke flavor. As luck would have it, you're very close to this CMS.
[ Only registered users can see links on this board! Get registered or login! ]

RavensScripts


But back to topic...

You can create a file with the name: block-teampspeak.php in your /blocks/ folder and add this code inside:

php Code:
<?php

if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
$content = '';
$content .= '<div id="ts3viewer_1039734"> </div>' . PHP_EOL;
$content .= '<script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script>' . PHP_EOL;
$content .= '<script type="text/javascript">' . PHP_EOL;
$content .= 'var ts3v_url_1 = \'http://www.tsviewer.com/ts3viewer.php?ID=1039734&text=fa0202&text_size=12&text_family=1&js=1&text_s_weight=bold&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_s_color_h=525284&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=underline&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_i_color_h=525284&text_i_weight_h=normal&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=underline&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_c_color_h=525284&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=underline&text_u_weight=bold&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_u_color_h=525284&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none\';' . PHP_EOL;
$content .= 'ts3v_display.init(ts3v_url_1, 1039734, 100);' . PHP_EOL;
$content .= '</script>' . PHP_EOL;
?>


After that you can try to activate the block in the block-administration.

_________________
Github: RavenNuke 
View user's profile Send private message
Guardian2003







PostPosted: Wed Mar 26, 2014 1:44 pm Reply with quote

Why it isn't safe; [ Only registered users can see links on this board! Get registered or login! ]

5 Reports containing 18 vulnerabilities and not one of them fixed - ever!
 
ryan333







PostPosted: Thu Mar 27, 2014 12:07 am Reply with quote

Thanks for the help i will try raven nuke! any cool clan gaming themes for it?
 
ryan333







PostPosted: Thu Mar 27, 2014 12:17 am Reply with quote

Oh chan i use phpnuke themes on raven nuke?
 
neralex







PostPosted: Thu Mar 27, 2014 6:30 am Reply with quote

[ Only registered users can see links on this board! Get registered or login! ] [ Only registered users can see links on this board! Get registered or login! ]

You can use after some little changes also phpnuke themes but the most of the old phpnuke have many markup issues because the most of them are outdated.
 
Guardian2003







PostPosted: Mon Mar 31, 2014 5:11 am Reply with quote

The code provided by neralex works fine on my development server but you may need to use it as a center box due to the width of the teamspeak server data.
The code uses javascript to fetch the remote data and displays it inside this DIV code
Code:


$content .= '<div id="ts3viewer_1039734"> </div>' . PHP_EOL;

The problem you might be having is that the width of that DIV is bigger than the width of the block (left and right) colums, so it pushes the data outside of the theme layout. Used as a center block, there is much more room.
There are some options you can try though;
You could add s style to your themes style sheet for the id ts3viewer_1039734, which would allow you to control the width with CSS
Code:


div.ts3viewer_1039734{
width150px;
}

Or you can change the code inside the block file to 'float' your image to the left and float your data to the right inside a wrapping DIV to keep it on the same row, something like;
Code:


$content = '';
$content .='<div style="width:100%;">';
$content .= '<div style="width:50%; float:left;">';
$content .= '<a target="_blank" href="https://imageshack.com/i/0rdapzxj"><img src="http://imagizer.imageshack.us/v2/xq90/27/dapzx.jpg" border="0"></a>';
$content .= '</div>';
$content .= '<div style="width:50%; float:right;" id="ts3viewer_1039734"> </div>' . PHP_EOL;
$content .= '<script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script>' . PHP_EOL;
$content .= '<script type="text/javascript">' . PHP_EOL;
$content .= 'var ts3v_url_1 = \'http://www.tsviewer.com/ts3viewer.php?ID=1039734&text=fa0202&text_size=12&text_family=1&js=1&text_s_weight=bold&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_s_color_h=525284&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=underline&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_i_color_h=525284&text_i_weight_h=normal&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=underline&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_c_color_h=525284&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=underline&text_u_weight=bold&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_u_color_h=525284&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none\';' . PHP_EOL;
$content .= 'ts3v_display.init(ts3v_url_1, 1039734, 100);' . PHP_EOL;
$content .= '</script>' . PHP_EOL;
$content .='</div>';
 
ryan333







PostPosted: Mon Mar 31, 2014 5:56 am Reply with quote

Guardian2003 wrote:
The code provided by neralex works fine on my development server but you may need to use it as a center box due to the width of the teamspeak server data.
The code uses javascript to fetch the remote data and displays it inside this DIV code
Code:


$content .= '<div id="ts3viewer_1039734"> </div>' . PHP_EOL;

The problem you might be having is that the width of that DIV is bigger than the width of the block (left and right) colums, so it pushes the data outside of the theme layout. Used as a center block, there is much more room.
There are some options you can try though;
You could add s style to your themes style sheet for the id ts3viewer_1039734, which would allow you to control the width with CSS
Code:


div.ts3viewer_1039734{
width150px;
}


So how is that done? I rather control the pixels.
 
ryan333







PostPosted: Mon Mar 31, 2014 6:05 am Reply with quote

Btw It is inside the block now just need to make the background transparent some how.
 
Guardian2003







PostPosted: Mon Mar 31, 2014 6:18 am Reply with quote

The background of what transparent?
The teamspeak server data doesn't appear to have any background, it just overlays the text into the block the same as it would if you were using plain text.

If you wanted to put the teamspeak data on top of your image, there is a way to do that but I think you may need to alter the transparency of the image itself using an image editor like Photoshop or Gimp.
 
ryan333







PostPosted: Tue Apr 01, 2014 3:33 pm Reply with quote

So just replace
Code:
'<div id="ts3viewer_1039734"> </div>'


This with
Code:
div.ts3viewer_1039734{

width150px;
}
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Apr 01, 2014 4:10 pm Reply with quote

The
css Code:
div.ts3viewer_1039734{

width150px;
}



would be added to your themes stylesheet as it is css, but you would need to use

css Code:
div#ts3viewer_1039734{

width150px;
}


since it is an id and not class.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
ryan333







PostPosted: Tue Apr 01, 2014 4:19 pm Reply with quote

So just replace
Code:
'<div id="ts3viewer_1039734"> </div>'


This with
Code:
div.ts3viewer_1039734{

width150px;
}
 
nuken







PostPosted: Tue Apr 01, 2014 4:23 pm Reply with quote

No.

Code:
'<div id="ts3viewer_1039734"> </div>'

is the code to display the div.

Code:
div#ts3viewer_1039734{

width150px;
}

Is css for styling the div and it needs to be put in your css. If you are using ravennuke, you could put it in the ravennuke.css file and it will be used on all themes, or you could put it in your themes style.css file if you need to change it for each theme.
 
nuken







PostPosted: Tue Apr 01, 2014 4:29 pm Reply with quote

I edited my last post, make sure you use the # and not the .

The # is css for id while the . is used for a class.
[ Only registered users can see links on this board! Get registered or login! ]
 
ryan333







PostPosted: Tue Apr 01, 2014 5:09 pm Reply with quote

Ok thanks!
 
ryan333







PostPosted: Tue Apr 01, 2014 5:13 pm Reply with quote

I added it to the raven nuke.css and it didnt change anything.
Sorry for all the stupid questions.
 
nuken







PostPosted: Tue Apr 01, 2014 5:58 pm Reply with quote

refresh your site a few time to clear the browser cache.
 
rave199
Hangin' Around



Joined: Mar 22, 2014
Posts: 30

PostPosted: Tue Apr 01, 2014 6:22 pm Reply with quote

omg neralax you shouldn't have advised him to go to clan themes that site has tons of virii on their themes. i picked up two themes from those crooked jerks and got several virii on the mystery inc site. luckily my hosting provider told me about the virii i caught but was KIND Razz enough to offer to get it off for only $199 dollars lol. To be honest i'm still looking for a clean site for myself to put a theme on the mystery inc site. i'm hoping to someday build my own themes preferably for ravennuke. First one i tried is a scoobydoo theme. unfortunately it did not look so good. The pictures were just overpowering the writing text and links inside the blocks which i know now why they only use color background instead of picture background. oh well i'll give it another shot again and see what happens.

But anyways php-nuke is full of security holes especially the 8.3.2 i ran some qualys security scans on it and forget it had over 216 vulnerabilities compared to ravennukes 43 which is a huge difference. But that was only from my personal site. i have no idea how many real vulnerabilities come with ravennuke. (not many though from what i gathered) and their security is really really good. trust me i know first hand after blocking my own ip address this morning running a vulnerability scanner test on my own site. i should of used a proxy or an online scanner instead oh well the point is ravennuke is by far one of the best cms you can use.
 
View user's profile Send private message
neralex







PostPosted: Tue Apr 01, 2014 9:10 pm Reply with quote

I can't follow you, rave199!

What do you mean with Virii? Viruses? I don't believe that clanthemes provides viruses with their files. PHP, HTML and CSS files are text files and not exutable applications. Maybe your Hosting company is kidding you. In most cases where files are infected, it happens on your local system after the download before you upload it to your server. Every good virus scanner on your local system would cry loudly if you are unpacking a ZIP/RAR with infected files.

Whether one likes or not a theme is always subjective. I like the work of clanthemes, pretty cool themes. Maybe a theme what do you like an another user would dislike it totally.
 
ryan333







PostPosted: Wed Apr 02, 2014 12:02 am Reply with quote

Thanks everyone!
Now I have a problem trying to put a donate button in a block zzzzzzzzzzzzzz.
Also How come I can't just use img code on the home page for a clan server viewer? Does that code have to be used in a block?
 
neralex







PostPosted: Wed Apr 02, 2014 2:39 am Reply with quote

BBCODES will work only in the forums, you can't use it page-wide.

Create a HTML block, click on the source button of the editor and use HTML tags like this:

html Code:
<div class="text-center">

<a href="http://yourpaypalurl.tld/whatever" target="_blank"><img src="path/to/yourimagefile.jpg" style="border:0 none" alt="donate" /></a>
</div>


BTW: Its really better for all others to follow a thread, if you would create a new thread for different questions and do not type different issues in the same one.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©