Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MYBB News Integration For Website?
#11
I need to arder by edit, if you need order by date, change ORDER BY b.edittime with bdate
Reply
#12
cheers for that thanks.

Haven't played with mysql much though I do know some very limited things.

Need to learn it a bit more.
Reply
#13
At this one:
$curper=substr($mpr['displaystyle'],0,-1);

The function substr(0,-1) in that case, removes last symbol from the DB result, in my case this is %.

If you want remove function and leave it only:

$curper=$mpr['displaystyle'];
Reply
#14
I have pulled this code out again and looking to make it a blog.

This is what I have so far.
https://cajgo-support.com/blog.php

Its pulling info from this forum.
https://community.cajgo-support.com/forum-23.html

I need to work out how to style it show a snippet of text and hide the login or modify it to use the sites frontpage header and footer instead of the forums which is probably what I will do.
If anyone can advise how to get a snippet of the actual post in the blog and forward back buttons so say 10 posts are shown on a page that would be great.
Also what codes I need to show the number of replies.

These are my plans:
  • Integrate the front page bootstrap header and footer
  • Show a snippet of text for the post and add a read more button
  • Style the page
  • Show number of replies
If anyone else has ideas I could do for the posts let me know.
I have another test file with code I will try to look at integrating part of that, though this other code doesn't grab from the mysql but uses mybb hooks.
Reply
#15
(05-23-2018, 08:59 AM)drguild Wrote: These are my plans:
  • Integrate the front page bootstrap header and footer
  • Show a snippet of text for the post and add a read more button
  • Style the page
  • Show number of replies
If anyone else has ideas I could do for the posts let me know.
I have another test file with code I will try to look at integrating part of that, though this other code doesn't grab from the mysql but uses mybb hooks.

To show, lets say first 50 characters + Show more after:

if (strlen($result)>50){$showmorebutton=" Show more...";}else{$showmorebutton="";};

$result = substr($myStr, 0, 50);

$mypost=$result.$showmorebutton;

After that you can style $showmorebutton whatever you want
Reply
#16
Thanks for the tip atm I am using the other code that hooks into mybb that was posted I will pm you about things.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)