The latest 5 topics

Go down

Solved The latest 5 topics

Post by Niko on April 22nd 2012, 2:49 pm

Hello,

well this is my problem: I'd like to have the latest 5 topics (of this page)
http://codes.forumotion.pro/search?search_id=newposts

inside a widget (added in templates). What can I do? Mr. Green
Thanks... Lol

edit: I use PunBB and Google Chrome


Last edited by Niko! on April 22nd 2012, 6:56 pm; edited 1 time in total
avatar
Niko
Hyperactive

Male Posts : 2299
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: The latest 5 topics

Post by LGforum on April 22nd 2012, 3:03 pm

Depends, how much Ajax do you already currently use?

Also, would modifying the recent topics widget suffice?
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: The latest 5 topics

Post by Niko on April 22nd 2012, 3:30 pm

@LGforum wrote:Depends, how much Ajax do you already currently use?

Also, would modifying the recent topics widget suffice?
well, I want to create a notices panel (like in Facebook)
avatar
Niko
Hyperactive

Male Posts : 2299
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: The latest 5 topics

Post by LGforum on April 22nd 2012, 4:03 pm

You can load that URL into a div just using jQuery .load() function, however, do you realse that guests can not view it? and hence it won't work for guests.

Which is why I suggest modifying recent topics widget instead.
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: The latest 5 topics

Post by Niko on April 22nd 2012, 4:10 pm

@LGforum wrote:You can load that URL into a div just using jQuery .load() function, however, do you realse that guests can not view it? and hence it won't work for guests.

Which is why I suggest modifying recent topics widget instead.

Yes, but I will use the tag in templates to allow only members to see it (:
But Can you help me? Can you provide the code? Mr. Green
avatar
Niko
Hyperactive

Male Posts : 2299
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: The latest 5 topics

Post by LGforum on April 22nd 2012, 4:59 pm

Yeah it would just be roughly this:
Code:

$('#yourdiv').load('/search?search_id=newposts .main-content');
Putting that in script tags right below the div in which you want them will make it work at its best. Change '#yourdiv' with the ID of your element obviously. Doesn't have to be a DIV.

You've got an Ajax Inbox script on your board. So from now on you'll have to use Ajax sparingly and controlled.

FYI, I should be sharing probably the most advanced latest topic system there is on forumotion soon. Well... its not in its basic form, but with the right creative thinking it can be.
avatar
LGforum
Hyperactive

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: The latest 5 topics

Post by Niko on April 22nd 2012, 5:43 pm

But in this way the style of the loaded part is bigger than what I want... Sad
What can I do?

Solved Mr. Green
avatar
Niko
Hyperactive

Male Posts : 2299
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum