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.

[Code]Latest Post HTML Code

View previous topic View next topic Go down

In progress [Code]Latest Post HTML Code

Post by cHaSwWind04 on May 14th 2013, 3:28 pm

Is there a way to get the latest posts or topics using only pure HTML code?
I'm making a html homepage and I need those.

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

In progress Re: [Code]Latest Post HTML Code

Post by Sir Chivas™ on May 14th 2013, 4:04 pm

Hi,

We cannot give such code out since we cannot access it. This widget has been created I believe inside the database or ACP. Not very sure. Confused



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

In progress Re: [Code]Latest Post HTML Code

Post by Ultron's Vision on May 14th 2013, 4:40 pm

It is created using PHP, you can access the latest post with http://help.forumotion.com/t123820-topic-title-here?view=newest

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: [Code]Latest Post HTML Code

Post by cHaSwWind04 on May 15th 2013, 4:28 am

So... how do I put into codes for that? I'm just learning HTML

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

In progress Re: [Code]Latest Post HTML Code

Post by Ultron's Vision on May 15th 2013, 9:32 am

Ah, you're trying to do it like forumotion does?

Sorry, that's not possible with pure HTML; forumotion uses - like basically every software does - PHP to grab the latest topics you haven't read.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: [Code]Latest Post HTML Code

Post by cHaSwWind04 on May 19th 2013, 11:18 am

Could you help me about that code... I like to see it..

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

In progress Re: [Code]Latest Post HTML Code

Post by Ultron's Vision on May 19th 2013, 12:07 pm

Well, this is basic SQL and PHP...

Code:
<?php
# code excluded here
while($member->logged_off){ // assume $member is an object including all personal data
$mysqli = new mysqli('database_address','admin','admin_password','log_status');
if(!$mysqli) { // check if connection exists, if not, throw an error
die("A database connection could not be established.");
}
else {
$mysqli->query("UPDATE `offline_members` WITH '".$member."'"); // update table
}
if($member->logged_on){ // check if member is online now
$member->logged_off = false; // terminate loop
}
}
if($_SERVER['PHP_SELF'] == "http://forumaddress.forum/search" && $_GET['search_id'] == "newposts"){
echo $postlist->newposts; // assume we have defined postlist as object
// and newposts check the update query we did a while ago
}
?>

That's just a draft and doesn't work if you extensive knowledge about the database forumotion uses.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

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