Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-16-2007, 01:17 AM
Casual Pligger
 
Join Date: Jan 2007
Posts: 38
Thanks: 0
Thanked 10 Times in 4 Posts
Wink [MOD] External Frame

Example :

http://www.qxygene.net/

Check out.php

Here is out.php

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

Code:
<?php $href = $_GET['href']; ?> 
<html>
<head>
<title><?php echo $href; ?></title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#008000" vlink="#008000" alink="#006800">
<style>
<!--
body,td,div,.p,a{font-family:arial,sans-serif;font-size:10pt}

a {text-decoration: none;}
a:hover {text-decoration: underline;}
.search {
margin-left:80px;
}
.toppad {
padding-top:10px;
text-indent: 8px;
}

.back {
	background-image:url(back.png);
	background-repeat:no-repeat;
	padding-left: 65px;
}

.submit {
	background-image:url(add.png);
	background-repeat:no-repeat;
	padding-left: 65px;
}

-->
</style>
<table width="100%" cellpadding="5" cellspacing="0" border="0">
	<tr>
	  
	  <td height="80px" width="21%" valign="top" nowrap class="back">
			<a href="http://www.qxygene.net/">Return to Marmaris Turkey</a><br />
			<img alt="" width="1" height="5" border="0"><br />
			<a href="http://www.qxygene.net/">www.qxygene.net/</a><br />
			<i>Home for Marmaris Turkey help.</i>
	  </td>

	  <td width="22%" valign="top" nowrap class="submit">
	  
	 <? echo '<a href="http://www.qxygene.net/submit.php?url='.$href.'" />Submit this site to Marmaris Turkey</a>'; ?>
	  
			<br />
<img alt="" width="1" height="5" border="0"><br />
			<a href="http://www.qxygene.net/">www.qxygene.net</a><br />
			<i>Share this site with others </i>
	  </td>


	  
	  <td width="53%" valign="top" nowrap>
		<script type="text/javascript"><!--
		google_ad_client = "pub-9011016055640112";
		google_alternate_color = "ffffff";
		google_ad_width = 468;
		google_ad_height = 60;
		google_ad_format = "468x60_as";
		google_ad_type = "text_image";
		//2006-11-30: Pligg Forum
		google_color_border = "ffffff";
		google_color_bg = "ffffff";
		google_color_link = "008000";
		google_color_text = "008000";
		google_color_url = "008000";
		//--></script>
		<script type="text/javascript"
 		 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
		</script>
	  </td>

		<td nowrap width="4%" valign="top" align="right" rowspan="2">
			<a href="<?php echo $href; ?>" target="_top">Close 
			<img src="collapse_tcat.gif" height="14" width="15" border="0"></a><br />
	  </td>
	</tr>
	<tr>
	 <td height="15px" width="100%" colspan="5" bgcolor="#efefef" >
		<form action="http://www.qxygene.net/search.php" method="get">
		<div class="toppad">
		You have temporarily left <b>Qxygene.com</b>, you have been redirected to <b><a href="<?php echo $href; ?>"><?php echo $href; ?></a></b>
		<span class="search">
     <input type="text" class="text" onclick="clearText(this, 'Search..')" onblur="restoreText(this,'Search..')" name="search" id="searchsite" value="" />
	 <input type="image" src="search.png" value="submit" class="go" />
   			  <br clear="all" />
		</span>
		</div>
	  </form>

	</td>	
	</tr>
</table>

<iframe id="theiframe" src="<?echo $href; ?>" width="100%" height="100%" scrolling="auto" frameborder="0" style="height:100%;frameborder:0px">  

</body>
</html>
--------

and


go to libs/html1.php

look under if ($URLMethod == 1)

find
Code:
If ($x == "outurl") {return my_pligg_base."/out.php?url=" . rawurlencode($var1);}
replace

Code:
If ($x == "outurl") {return my_pligg_base."/out.php?href=".$var1;}
Regards..

Last edited by qxygene; 01-26-2007 at 08:45 AM.. Reason: added code tags
Reply With Quote
The Following 7 Users Say Thank You to qxygene For This Useful Post:
  #2 (permalink)  
Old 01-16-2007, 03:51 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,218
Thanks: 64
Thanked 207 Times in 148 Posts
he beat me to it damn

You should santize the $_GET['href'], with strip_tags().
__________________
Anatomy of the Pligg template Help needed
Reply With Quote
  #3 (permalink)  
Old 01-16-2007, 08:17 AM
New Pligger
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
In stead of the button that says submit is there a way of loading up the vote button if the user is logged in showing the number of votes the story has.

SUbmitting the story again will lead to errors about duplicate content
Reply With Quote
  #4 (permalink)  
Old 01-16-2007, 11:14 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
I was thinking...

What's the purpose of the "submit this site to ____ " link in the frame? I mean I can see why it would be useful for the frame on the forum but if you're viewing the website through a frame on your website doesn't that mean the site's already been submitted to your website?
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #5 (permalink)  
Old 01-16-2007, 11:19 AM
New Pligger
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
exactly what I mean



Am working on this at present and will post back once I solve it,on a different note, am new to smarty and I was wondering which file in pligg stores the variables that are later called in the template
Reply With Quote
  #6 (permalink)  
Old 01-16-2007, 11:38 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,218
Thanks: 64
Thanked 207 Times in 148 Posts
what i was planning to do was:

(have a look at the out.php)
It actually reads the information from the database. So information such as number of votes, title of story.

and the url you need to redirect to is $url.

So you can just put html/php code after the ?>
__________________
Anatomy of the Pligg template Help needed
Reply With Quote
  #7 (permalink)  
Old 01-19-2007, 07:25 PM
Casual Pligger
 
Join Date: Dec 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
How can we pass other variables, like title to the second page, would it be $title? even if its href=url? Thanks
Reply With Quote
  #8 (permalink)  
Old 01-19-2007, 11:42 PM
New Pligger
 
Join Date: Jan 2007
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
I don't understand

I'm not seeing any external frame on the page.

Could this be a Firefox issue?
Reply With Quote
  #9 (permalink)  
Old 01-19-2007, 11:47 PM
New Pligger
 
Join Date: Jan 2007
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Doh, never mind

I was thinking the OP was referring to an iframe somewhere on the main page, not on the offsite pages.

My bad. Nice mod.
Reply With Quote
  #10 (permalink)  
Old 01-26-2007, 05:37 AM
Jarda's Avatar
New Pligger
 
Join Date: Jan 2007
Posts: 27
Thanks: 5
Thanked 1 Time in 1 Post
iFrame help

Hello, i have seen iFrame mod working on your site and this is exactly what i need.

I have problem with implementation.

WHat i did:

1. I replaced entire out.php code with your code and i replaced your links and names with my names and links.

2. my admin setup:

Outgoing:

description: Enable outgoing links.
TRUE

description: Outgoing links.
URL

Story:

description: Use the story title as link to story's website.
FALSE

description: If use story title as link is true, this setting allows you to make the link open in a new window.
FALSE

if i experiment...links going out but i am unable to see any frame with buttons and adsense code....i see target site only....
__________________
Share-News.net
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Voting from external frame ramos67 Modification Tutorials 35 09-12-2008 04:50 PM
External Vote Button (EVB) Yankidank Modification Tutorials 59 07-24-2008 07:51 PM
Need help with External Vote Button Please! bbrian017 General Help 10 01-30-2008 05:28 PM
How to use external smtp server with authentication hhello General Help 0 08-13-2007 04:13 AM
redirection frame cryptkeeper Suggestions 2 01-12-2006 12:22 PM


Search Engine Friendly URLs by vBSEO 3.2.0