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

View previous topic View next topic 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

Niko
Hyperactive

Male Posts : 2166
Reputation : 93
Language : English, French, Italian, Spanish, Latin

https://www.translationscloud.com/?utm_source=forumotion&utm

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?

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
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)

Niko
Hyperactive

Male Posts : 2166
Reputation : 93
Language : English, French, Italian, Spanish, Latin

https://www.translationscloud.com/?utm_source=forumotion&utm

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.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
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

Niko
Hyperactive

Male Posts : 2166
Reputation : 93
Language : English, French, Italian, Spanish, Latin

https://www.translationscloud.com/?utm_source=forumotion&utm

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.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
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

Niko
Hyperactive

Male Posts : 2166
Reputation : 93
Language : English, French, Italian, Spanish, Latin

https://www.translationscloud.com/?utm_source=forumotion&utm

Back to top Go down

View previous topic View next topic Back to top


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