Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2007, 06:43 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
iFrame with vote and sidebar published stories

Hi there,

I am currently working on a mod to have a frame open at the side of the page when a story is viewed. This frame will give users the ability to vote and also link back to the site to view other published stories.

I have managed to get a fair amount done but now I need some help.

To show the published stories I call sidebar_stories.php, however when you click on one of the stories it opens it in the frame not in the entire page.

Is there a way to make sidebar_stories open in target_"parent" so it opens in the current window and not just in the frame?

Once I have complete this MOD I will release instructions and files so others can create it themselves. However there are a lot of files to modify to get it to work, so please give me time to complete.

I have attached some screenshots to give you an idea of what it will look like.

The frame1.jpg shows what it looks like (haven't completed the voting yet)

frame2.jpg shows what it looks like after you click on one of the stories under published links

Any help and comments will be greatly appreciated

Cheers

Dan

Linka / Published Links
Attached Thumbnails
iframe-vote-sidebar-published-stories-frame1.jpg   iframe-vote-sidebar-published-stories-frame2.jpg  
Reply With Quote
  #2 (permalink)  
Old 09-12-2007, 07:33 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,397
Thanks: 171
Thanked 439 Times in 278 Posts
I have no idea if this would work but it's worth a shot.
Code:
window.document.base.target="_parent";
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
The Following User Says Thank You to chuckroast For This Useful Post:
  #3 (permalink)  
Old 09-12-2007, 07:37 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
Quote:
Originally Posted by chuckroast View Post
I have no idea if this would work but it's worth a shot.
Code:
window.document.base.target="_parent";
In which file and where should I put it?
Reply With Quote
  #4 (permalink)  
Old 09-12-2007, 08:06 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
Fixed - changed the following in sidebar_stories.tpl
Code:
{if $Voting_Method eq 1}
	<div class="sstories">
		<span class="count_total"><a href="{$story_url}">{$link_shakebox_votes}</a></span>
	</div>
{/if}

<a href="{$story_url}" class="switchurl">{$title_short}</a>
to

Code:
{if $Voting_Method eq 1}
	<div class="sstories">
		<span class="count_total"><a href="{$story_url}" target="_parent">{$link_shakebox_votes}</a></span>
	</div>
{/if}

<a href="{$story_url}" class="switchurl" target="_parent">{$title_short}</a>
Please could you keep this post open and not marked as solved so if I have other queries I don't need to start a new thread.

Thanks Chuckroast your suggestion got me thinking where to put the code and I realised this was the one place I hadn't checked.
Reply With Quote
  #5 (permalink)  
Old 09-28-2007, 05:47 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
OK so I am nearly there. I am going to release a "how to" shortly. I have not managed to get the voting working as I would have liked to so when the "how to" is released it will not include voting. Please see image below for what it will look like.

Before I release it I need to get one thing tidied up..... The close button at the top right of the frame. At the moment it takes you back to the page you came from. Essentially it is just a "back button". It would be better if it actually closed the frame and just showed the page you are looking at with no frame. An example of this can be seen here at upnews.it, They have implemented this frame already and the close button works as it should (they have also done th voting bit but don't seem to want to share).

If anyone knows how to do this please let me know so I can get this out for others to use.

Also if anyone wants to team up and work on the voting side of things that would be great too.
Attached Thumbnails
iframe-vote-sidebar-published-stories-picture-1.png  
__________________
Cheers

Dan
Reply With Quote
  #6 (permalink)  
Old 09-28-2007, 06:20 PM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 226
Thanks: 16
Thanked 16 Times in 15 Posts
Quote:
Originally Posted by linka View Post
OK so I am nearly there. I am going to release a "how to" shortly.
I will be watching for this.
__________________
My Pligg Site: Critique My Art
My Arts Directory: Links 2 Arts
Reply With Quote
  #7 (permalink)  
Old 09-30-2007, 09:52 PM
VLJ VLJ is offline
Pligg Donor
Pligg Version: beta 9.8.2
Pligg Template: modified yget
 
Join Date: Feb 2007
Posts: 62
Thanks: 36
Thanked 2 Times in 2 Posts
Not sure if it is this simple or not... But it looks like upnews.it's close button is just a link to the story. So, click the close and it loads the linked story instead of the linked story within a frame.

Looking forward to you progress!
Reply With Quote
  #8 (permalink)  
Old 09-30-2007, 11:06 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
Quote:
Originally Posted by VLJ View Post
Not sure if it is this simple or not... But it looks like upnews.it's close button is just a link to the story. So, click the close and it loads the linked story instead of the linked story within a frame.

Looking forward to you progress!
Yeah I saw that, what I can't figure out is how to make the back button link to the main story url (without the frame)
__________________
Cheers

Dan
Reply With Quote
  #9 (permalink)  
Old 10-01-2007, 01:35 PM
VLJ VLJ is offline
Pligg Donor
Pligg Version: beta 9.8.2
Pligg Template: modified yget
 
Join Date: Feb 2007
Posts: 62
Thanks: 36
Thanked 2 Times in 2 Posts
I guess I'm confused... Where does the back button come into this?
Reply With Quote
  #10 (permalink)  
Old 10-01-2007, 03:33 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
Quote:
Originally Posted by VLJ View Post
I guess I'm confused... Where does the back button come into this?
Sorry "back button" = "close button", it is because at the moment my close button has the functionality of a back button.
__________________
Cheers

Dan
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
Sidebar top vote today clems365 General Help 4 10-19-2007 02:40 PM
Top links sidebar causes Error: Vote Already Cast formicin Bug Report 0 06-03-2007 08:30 AM
Pligg beta 9.5 [updated] kbeeveer46 Current Version 0 04-29-2007 09:58 PM


Search Engine Friendly URLs by vBSEO 3.2.0