The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

The latest 5 topics

2 posters

Go down

Solved The latest 5 topics

Post by Niko Sun Apr 22, 2012 12: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 Sun Apr 22, 2012 4:56 pm; edited 1 time in total
Niko
Niko
Helper
Helper

Male Posts : 3303
Reputation : 255
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: The latest 5 topics

Post by LGforum Sun Apr 22, 2012 1:03 pm

Depends, how much Ajax do you already currently use?

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

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: The latest 5 topics

Post by Niko Sun Apr 22, 2012 1: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
Niko
Helper
Helper

Male Posts : 3303
Reputation : 255
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: The latest 5 topics

Post by LGforum Sun Apr 22, 2012 2: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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: The latest 5 topics

Post by Niko Sun Apr 22, 2012 2: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
Niko
Helper
Helper

Male Posts : 3303
Reputation : 255
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: The latest 5 topics

Post by LGforum Sun Apr 22, 2012 2: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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: The latest 5 topics

Post by Niko Sun Apr 22, 2012 3: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
Niko
Helper
Helper

Male Posts : 3303
Reputation : 255
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Back to top

- Similar topics

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