Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 230
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 196
Total: 196

Author Topic: Download content RSS feed  (Read 22010 times)

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Download content RSS feed
« Reply #30 on: August 04, 2015, 10:57:46 am »
This will require a minor edit to Downloads2.php since this will not be what everyone needs here

Around line 1279
change
Code: [Select]
// Get the download information
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_FILE, p.totalratings, p.rating, p.allowcomments, p.ID_CAT, p.keywords,
p.commenttotal, p.filesize, p.filename, p.orginalfilename, p.fileurl, p.extrafilescount,
p.approved, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description,
    c.title CAT_TITLE, c.ID_PARENT, c.disablerating, p.credits, p.totaldownloads,  p.lastdownload,
    c.minposts, c.agelimit, p.ID_PICTURE, mg.online_color, p.ID_TOPIC
FROM ({db_prefix}down_file as p,  {db_prefix}down_cat AS c)
LEFT JOIN {db_prefix}members AS m ON  (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}membergroups AS mg  ON (m.ID_GROUP = mg.ID_GROUP)
WHERE p.ID_FILE = $id AND p.ID_CAT = c.ID_CAT LIMIT 1");

    // Check if download exists
    if ($smcFunc['db_affected_rows']()== 0)
    fatal_error($txt['downloads_error_no_downloadexist'], false);

    $row = $smcFunc['db_fetch_assoc']($dbresult);


To
Code: [Select]
// Get the download information
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_FILE, p.totalratings, p.rating, p.allowcomments, p.ID_CAT, p.keywords,
p.commenttotal, p.filesize, p.filename, p.orginalfilename, p.fileurl, p.extrafilescount,
p.approved, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description,
    c.title CAT_TITLE, c.ID_PARENT, c.disablerating, p.credits, p.totaldownloads,  p.lastdownload,
    c.minposts, c.agelimit, p.ID_PICTURE, mg.online_color, p.ID_TOPIC, c.image, c.filename imagefilename
FROM ({db_prefix}down_file as p,  {db_prefix}down_cat AS c)
LEFT JOIN {db_prefix}members AS m ON  (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}membergroups AS mg  ON (m.ID_GROUP = mg.ID_GROUP)
WHERE p.ID_FILE = $id AND p.ID_CAT = c.ID_CAT LIMIT 1");

    // Check if download exists
    if ($smcFunc['db_affected_rows']()== 0)
    fatal_error($txt['downloads_error_no_downloadexist'], false);

    $row = $smcFunc['db_fetch_assoc']($dbresult);


if ($row['image'] == '' && $row['imagefilename'] == '')
{

}
else
{
if ($row['filename'] == '')
$row['description'] =  '<img src="' . $row['imagefilename'] . '" alt="" />' . "\n"  . $row['description'];
else
$row['description'] =  '<img src="' . $modSettings['down_url'] . 'catimgs/' . $row['imagefilename'] . '" alt="" />' . "\n" . $row['description';
}



Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #31 on: August 04, 2015, 11:03:41 am »
I made the code changes you made but I still don't get any images
http://forum.youmobile.org/downloads/?sa=view;down=3875

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Download content RSS feed
« Reply #32 on: August 04, 2015, 11:11:50 am »
This one should fix it.
Code: [Select]
// Get the download information
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_FILE, p.totalratings, p.rating, p.allowcomments, p.ID_CAT, p.keywords,
p.commenttotal, p.filesize, p.filename, p.orginalfilename, p.fileurl, p.extrafilescount,
p.approved, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description,
    c.title CAT_TITLE, c.ID_PARENT, c.disablerating, p.credits, p.totaldownloads,  p.lastdownload,
    c.minposts, c.agelimit, p.ID_PICTURE, mg.online_color, p.ID_TOPIC, c.image, c.filename imagefilename
FROM ({db_prefix}down_file as p,  {db_prefix}down_cat AS c)
LEFT JOIN {db_prefix}members AS m ON  (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}membergroups AS mg  ON (m.ID_GROUP = mg.ID_GROUP)
WHERE p.ID_FILE = $id AND p.ID_CAT = c.ID_CAT LIMIT 1");

    // Check if download exists
    if ($smcFunc['db_affected_rows']()== 0)
    fatal_error($txt['downloads_error_no_downloadexist'], false);

    $row = $smcFunc['db_fetch_assoc']($dbresult);


if ($row['image'] == '' && $row['imagefilename'] == '')
{

}
else
{
if ($row['imagefilename'] == '')
$row['description'] =  '<img src="' . $row['imagefilename'] . '" alt="" />' . "\n"  . $row['description'];
else
$row['description'] =  '<img src="' . $modSettings['down_url'] . 'catimgs/' . $row['imagefilename'] . '" alt="" />' . "\n" . $row['description'];
}




Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #33 on: August 04, 2015, 11:18:49 am »
still not working, please check your forum personal messages

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #34 on: August 04, 2015, 12:07:15 pm »
It's working now thank you

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Download content RSS feed
« Reply #35 on: August 04, 2015, 12:33:14 pm »
Glad you have it working
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #36 on: August 04, 2015, 12:39:20 pm »
Glad you have it working

Thank you for all your help, we are glad to purchase your product.

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #37 on: August 06, 2015, 08:08:54 am »
How to control the RSS feed content number ? it's currently 50

how to change it ?

thank you,

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Download content RSS feed
« Reply #38 on: August 06, 2015, 09:03:49 am »
In Sources/Downloads2.php
Find and change
Code: [Select]
WHERE p.approved = 1 AND (c.view IS NULL || c.view =1) GROUP by p.ID_FILE ORDER BY p.ID_FILE DESC LIMIT 50
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #39 on: August 06, 2015, 12:11:14 pm »
If i want to display a special message only in categories that is empty (no downloads added yet).

Which part of the code I can echo a message only when the table is empty ?

thank you,

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #40 on: August 07, 2015, 03:06:55 am »
If i want to display a special message only in categories that is empty (no downloads added yet).

Which part of the code I can echo a message only when the table is empty ?

thank you,

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Download content RSS feed
« Reply #41 on: August 07, 2015, 10:52:40 am »
In downloads2.template.php around line 174

Code: [Select]
// Options
if ($g_manage)
{
echo '<th scope="col" class="smalltext last_th">',$txt['downloads_cat_options'],'</th>';
$count++;
}

echo '
        </tr></thead>';


$downloadClass = 'windowbg';

foreach ($context['downloads_files'] as $i => $file)
Before
Code: [Select]
foreach ($context['downloads_files'] as $i => $file)
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #42 on: August 10, 2015, 05:19:52 am »
Where I can edit/modify the top buttons "buttonlist floattop" ? which file ?

thank you

Offline coolfx35

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Download content RSS feed
« Reply #43 on: August 10, 2015, 04:15:35 pm »
Hi,
I solved the button issue above.


Now I am looking on how to add OG:TAGS to the rest of the download module, not just the download page. I want to add specific OG:tags to the index page and category pages too.

Please help,

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Download content RSS feed
« Reply #44 on: August 11, 2015, 11:20:47 pm »
You would need to use $context['html_headers'] .= 'your  og tags here';
In Sources/Downloads2.php
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3907 Views
Last post October 24, 2008, 12:46:47 am
by CG Icon
1 Replies
5211 Views
Last post February 28, 2013, 07:14:10 am
by simple_joe
1 Replies
3432 Views
Last post June 04, 2013, 12:38:15 pm
by SMFHacks
2 Replies
5151 Views
Last post November 25, 2015, 09:55:27 pm
by PapaTango
3 Replies
4104 Views
Last post October 31, 2016, 03:53:14 pm
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal