Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 15, 2022, 09:50:05 PM

Login with username, password and session length
Members
  • Total Members: 3842
  • Latest: Kokoro
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 51
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 56
Total: 56

Author Topic: [Discussion] Random topic  (Read 42091 times)

0 Members and 1 Guest are viewing this topic.

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: [BLOCK] Random topic
« Reply #10 on: August 09, 2009, 12:29:43 PM »
Just remember that each time you call the loadMemberContext to grab this info, you add a query to the database. I thought it a good idea to loop through that function for an array of members once, and it added like 10 queries because I was trying to get 10 users avatars. For this code it works great, but if you wanted to get more than one user, you'd be better to combine your query into a single one just to grab the avatar info. Just my $.02 :)

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: [BLOCK] Random topic
« Reply #11 on: August 09, 2009, 12:38:39 PM »
Yeah that sounds wise.  I was a little worried by the overheads, but figured it would be okay for this.  For my mod I could need to pull quite a few avatars so I will give your suggestion a go.

P.S. I was trying to look up the function in the SMF functions database but for some reason it's been down since yesterday it looks like.  They're working on it.  What I may do is take a look at the details and maybe post an alternative.
« Last Edit: August 09, 2009, 01:09:48 PM by freddy888 »

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: [BLOCK] Random topic
« Reply #12 on: August 09, 2009, 09:04:17 PM »
I've blocked your PM's.... :P No seriously, some posts must have been removed or something as we have a limit of 5 posts here before you can PM. Anyway, one more post and you can PM me I think. I've been getting a ton of PM's lately, and I'm not getting notifications for any of them for some reason. So I most likely have missed something if you sent one. I'll send you an email shortly. You picked an odd place to post for my attention. lol


historik

  • Guest
Re: [BLOCK] Random topic
« Reply #13 on: August 09, 2009, 09:09:15 PM »
ok thx

alving

  • Guest
Re: [BLOCK] Random topic
« Reply #14 on: August 12, 2009, 03:48:14 AM »
woww... thank you very much freddy888 for the code!!!  might have some more questions for you..   ;)

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: [BLOCK] Random topic
« Reply #15 on: August 12, 2009, 04:14:12 AM »
You are welcome :)

Probably just needs some work on the layout still so it's just the way you want it...

alving

  • Guest
Re: [BLOCK] Random topic
« Reply #16 on: August 19, 2009, 05:59:26 AM »
hello freddy888

it took me ages to come up with the formatting.  so as not to change so much in jpdeni's code, here is what i thought.

avatar image   post icon and post title
                     date and time of post
                     display name


please get rid of the word "by" before the username.  
please put a thin border around the avatar.  
a provision to resize the avatar
a provision to have a generic avatar for those without an avatar

thanks once again!  
« Last Edit: August 19, 2009, 06:03:00 AM by ajg »

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: [BLOCK] Random topic
« Reply #17 on: August 19, 2009, 06:10:56 AM »
Hi ajg, yes that looks do-able.  So basically you want the avatar over on the left-hand side like a forum post ?  And everything else on the right?  Not sure where you want the actual message to appear...maybe like this :


Avatar      |       post icon & title
               |       date and time
               |       display name
--------------------------------------------
main message underneath ?


please get rid of the word "by" before the username - no problem
please put a thin border around the avatar - no problem
a provision to resize the avatar - that should be fine
a provision to have a generic avatar for those without an avatar - can do I think..

I need to go to the shops now (darn RealLife!) but it shouldn't be too long a wait.

Cheers.

alving

  • Guest
Re: [BLOCK] Random topic
« Reply #18 on: August 19, 2009, 02:32:49 PM »
that's exactly what i want please. thanks in advance!

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: [BLOCK] Random topic
« Reply #19 on: August 19, 2009, 02:38:13 PM »
Ok mate.  I went out tonight or I would have posted it already.  I am working on it, I'll drop it in tomorrow (getting late here) at some point.  Cheers :)