TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 450
  • Total: 450

Bloc contains downloadlinks

Started by Kim, October 06, 2009, 09:57:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kimmen

#20
I am missing this overview:



Icon|Name|LINK|LINK|Username|Time/date|

I also notice that when it gets my username, it gets my origin username and not nickname. I would also like the nickname to be clickable if possible.

Since all this is in an upperblock, could we center it? And maby add a color to the name?

Yeah, now you probably get abit mad at me, since i did not post anything about this in the start, sorry !  :'(


EDIT: This is how it looks like, could the tables look like the last forumposts?




JPDeni

I didn't know if you wanted the labels or not. I can put it in.

QuoteI also notice that when it gets my username, it gets my origin username and not nickname.

It takes it from the post. Whatever shows on the post shows on the table. At least, that's what it should be. I never know which name is going where because on my site, the two names are always the same.

Quoteclickable if possible.

To the profile? Yes, that's possible. Your example didn't show a clickable username, so I had no way of knowing that you wanted it.

Certainly it can be centered.

QuoteAnd maby add a color to the name?
What color do you want?

QuoteYeah, now you probably get abit mad at me, since i did not post anything about this in the start, sorry ! 

I'll admit that I get frustrated when I have to pry out what people want from them and they still don't tell me until I've already written the code. That's why I give people one more chance to tell me what they want after I've written the first code. But after I write the code twice, I'm done.

Kimmen

QuoteWhatever shows on the post shows on the table

In my post it shows my nickname: -=[TLID]=-Kimmen
In table it shows my origin: Kimmen.nor

I want the nickname to be displayed if you can.

QuoteYour example didn't show a clickable username, so I had no way of knowing that you wanted it.

Very sorry for that, but i do want it if its ok.

QuoteCertainly it can be centered.
Awesome

QuoteWhat color do you want?
Can you make it so i can choose myself? That i just put in an html color code?

Again, sorry for not making my request perfect, thanks for helping me out Deni, if i could, i would kiss you    :-*

JPDeni

Okay. This is all the things you asked for. You can change the color of the members' names in the $member_color line.


global $db_prefix, $scripturl;

$board = 2; // change this to the number of the Drop Report board
$number_to_display = 5; // change this to how many you want to display
$img_dir = 'images';  //change this to the name of the directory where your game images are
$member_color = '000000'; //hex number for the color of members' names

$query = db_query(
    "SELECT mes.body, mes.posterTime, mes.ID_MEMBER, mem.realName
     FROM {$db_prefix}messages as mes, {$db_prefix}topics as top, {$db_prefix}members as mem
     WHERE top.ID_BOARD = $board
     AND top.ID_FIRST_MSG = mes.ID_MSG
     AND mes.ID_MEMBER = mem.ID_MEMBER
     ORDER BY mes.posterTime DESC
     LIMIT $number_to_display", __FILE__, __LINE__);

echo '<table border=1 style="margin-left:auto; margin-right:auto;">';
echo '<tr><td>Icon</td><td>Name</td><td>LINK</td><td>LINK</td><td>Username</td><td>Time/date</td></tr>';
while ($row = mysql_fetch_assoc($query))
{
  $lines = array();
  $lines = explode("<br />", $row['body']);
  echo '<tr><td><img src="' . $img_dir . '/' . $lines[0] . '"></td>';
  echo '<td>' . $lines[1] . '</td>';
  $link1 = $lines[2];
  $link1 = str_replace('(','<a href="',$link1);
  $link1 = str_replace(') ','">',$link1);
  $link1 = $link1 . '</a>';
  echo '<td>' . $link1 . '</td>';
  $link2 = $lines[3];
  $link2 = str_replace('(','<a href="',$link2);
  $link2 = str_replace(') ','">',$link2);
  $link2 = $link2 . '</a>';
  echo '<td>' . $link2 . '</td>';
  echo '<td><a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color:#' . $member_color . '">' . $row['realName'] . '</a></td>';
  echo '<td>' . timeformat($row['posterTime']) . '</td></tr>';
}
echo '</table>';


Take care. :)

Kimmen

Thanks Deni, ive got one problem, when i edit my topic, the link repeats itself, so when i click on in the upperblock, i get in my web browser, the link twice. Can this be fixed please?


Many thanks so far..

JPDeni

Quotewhen i edit my topic, the link repeats itself

I am unable to repeat your problem on my test site, so the problem must be something on your site and not in my code. I'm not even sure if I understand what you mean. Maybe if you gave an example of what happened, it would be clearer.

Kimmen

What happen is this:

1. I post this as a new topic in my forum:

cod5.jpg
Call of Duty 5 - World at War
(http://www.theoaps.com/index.php?topic=212.0) Forumlink
(http://www.gamershell.com/pc/call_of_duty_world_at_war/) Latest Patches

2. When i post, links look like this:

cod5.jpg
Call of Duty 5 - World at War
(http://www.theoaps.com/index.php?topic=212.0) Forumlink
(http://www.gamershell.com/pc/call_of_duty_world_at_war/) Latest Patches

3. When i click the link in my upperpanel, i get this url:
http://www.theoaps.com/%5Burl=http://www.theoaps.com/index.php?topic=212.0]http://www.theoaps.com/index.php?topic=212.0[/url]

And this is also how it looks like in my post when i press the edit button to modify my post  :-\

I dunno what happen !?

JPDeni

Are you using the url tags in your post? If so, don't.

I used your example in my test post and there was no problem at all.

Check it out here. You can see both the post and the block.

Kimmen

No i am not, but i am however using    Aeva ~ Auto-Embed Video & Audio      6.2.75

Could this maby be the reason?

I am not adding the url tags myself.

JPDeni

I don't know. Maybe. It could be that the mod alters the post. Are the url tags in the post when you modify it?

This website is proudly hosted on Crocweb Cloud Website Hosting.