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
nooneuk
New Member
New Member



Joined: Feb 21, 2012
Posts: 2

PostPosted: Sun Feb 26, 2012 4:39 am Reply with quote

Hi to All

Firstly i thank you for making this site for one and all.

I am looking to make a block from another website i host,

Can this be done ?

could you help me ?

where do i start ?

what info do you need if you can help ?

Thanks in advance
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Feb 26, 2012 8:05 am Reply with quote

Not entirely clear yet on what you are wanting to do. Can you be a little more specific about what content from this other site you want to put into a block? Are you wanting to just embed the whole site into a block? Does the site produce some type of content which is consumable elsewhere such as an RSS/ATOM/XML feed?

_________________
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! 
View user's profile Send private message Visit poster's website
nooneuk







PostPosted: Thu Mar 01, 2012 3:38 am Reply with quote

hi there

thanks for getting back to me ..

http://addons.eventscripts.com/addons/view/PremiumMod2

i am looking to add the above script to a block, well the web side of it.

i have managed to get it working as a website but just want to keep it all in one place

thanks again
 
eldorado
Involved
Involved



Joined: Sep 10, 2008
Posts: 424
Location: France,Translator

PostPosted: Thu Mar 01, 2012 7:30 am Reply with quote

http://addons.eventscripts.com/addons/view/PremiumMod2 wrote:
- Premium Mod is an eventscripts addon that allows people to go to an external webhost server and use a paypal account to donate to the clan. They will then be added to a list that is loaded in by the addon and they can gain special ingame abilities.



you mean something like this ?
Code:


<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-Block_Creator.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
$content  =  "your content here";
?>


well , all you need to do is paste the code from your file in here and replace all instances of echo by $content
test and retest until it works

Save to block_premiummod2.php
Upload this to /block/ folder

(note , just paste us your code if it's not this working

note2: wtf is this cracked mod...pay for more extras....defeats the purpose of the game lol Sad

_________________
Only registered users can see links on this board! Get registered or login! (My RN site)- Only registered users can see links on this board! Get registered or login!(cod4 clan) - Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website MSN Messenger
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Thu Mar 01, 2012 8:13 am Reply with quote

If I grasp the concept of that script... seems to me that it needs to be modified into a module not a block. I honestly don't get it though... not sure what the purpose of that script is.

_________________
Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett 
View user's profile Send private message
eldorado







PostPosted: Thu Mar 01, 2012 3:36 pm Reply with quote

killing-hours wrote:
If I grasp the concept of that script... seems to me that it needs to be modified into a module not a block. I honestly don't get it though... not sure what the purpose of that script is.
Well , I already installed these kind of scripts a lonnng time ago.....while i was dev at AMXx i helped on a similar one for cs1.6

Basic principle is :Allowing management of a script running on hlds(source dedicated server) via MySQL , the mod script writes/reads data in a MySQL database .
And of course where MySQL is concerned , you can access the database from a php script
This mod , enables a user to pay a certain amount and gain access to server privileges. How is this achieved I don't know and i didn't do any research on the matter


However , i did look at the script and the best thing you can do , is to make a module out of it (with an iframe = easy) and put a button to redirect to your users..

That way you can keep the script integrity in one place in case it changes to reflect sourcemod changes.

Thats what it does:
edit1:
Code:
<form name="_xclick" action="https://www.paypal.com/us/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="amount" value="5.00">
<input type="hidden" name="business" value="youremail@yourdomain.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="PremiumMod Payment">
<input type="hidden" name="notify_url" value="http://www.yourdomain.com/CSS/addsteam.php">
<input type="hidden" name="return" value="http://www.yourdomain.com/CSS/index.php?paypal=success">
<input type="hidden" name="cancel_return" value="http://www.yourdomain.com/CSS/index.php?paypal=fail">
<input type="hidden" name="rm" value="1">




You will need for your integrated block or module these files:
addsteam.php
index.php (rename it to css-index.php)
donate.php -> you will have to convert it to a block or module ( do we have a module tuts here?) follow instructions from here Only registered users can see links on this board! Get registered or login! and don't forget to change the url to make it work
i'm not sure index.php?paypal=fail will work as expected if you don't change the mechanic..

You will also have to either change the call to the database to reflect what you installed or leave it as it is. what i mean is
CSS/admin/config.php in your webfolder calls for an external database from the point of view of nuke
for instance in donate.php you have on line29:
Code:
<?php require("admin/config.php"); writeFlags(); ?>


and a bit further down

Code:
<?PHP

                        $link = @mysql_connect(_HOST,_USER,_PASS);
                        @mysql_select_db(_DB);
                        $query = 'SELECT * FROM '._TBL.' ORDER BY id';
                        $results = @mysql_query($query);
                        while($line = @mysql_fetch_assoc($results)) {
                            echo '<li>'.$line["playername"].'</li>';
                        }
                    ?>


which in nuke translates to this->db-> (whatever code in here)


I think i said all i know about how to create this module
 
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 ©