The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

The latest 5 topics

Go down

Solved The latest 5 topics

Post by Niko on Sun 22 Apr - 8:49

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 Sun 22 Apr - 12:56; 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 Sun 22 Apr - 9:03

Depends, how much Ajax do you already currently use?

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

Male Posts : 2262
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 Sun 22 Apr - 9:30

@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 Sun 22 Apr - 10:03

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 : 2262
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 Sun 22 Apr - 10:10

@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 Sun 22 Apr - 10:59

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 : 2262
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 Sun 22 Apr - 11:43

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