Announcement

Collapse
No announcement yet.

Make download counter to be emeded inside blogs posts

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Make download counter to be emeded inside blogs posts

    I want to create this counter to count every time a link has been clicked to download an item and to reflect this value inside posts. ( especially blogs posts)
    I have created a table in my database called " book_downloads " to store the download counts and timestamps:

    CREATE TABLE book_downloads (
    book_id INT(10) UNSIGNED NOT NULL,
    download_count INT DEFAULT 0,
    last_download TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (book_id),
    FOREIGN KEY (book_id) REFERENCES node(nodeid)
    );​

    This table links book_id to the nodeid of the blogs post in the node table, ensuring data integrity through a foreign key constraint.

    And then I have lost the road with HOOKS and templates, finally I came here.

    #2
    vB5 already has view counts for each attachment. Though it doesn't work properly.

    How would the system differentiate book downloads with any other attachments in a post? The system has to know which attachment to apply the book download counts to.
    Buy me a coffeePayPal QR Code
    My Amazon Affiliate Link
    Fast vBulletin VPS Host:
    This site is hosted by IONOS

    Comment

    Latest Posts

    Collapse

    Working...
    X
    Searching...Please wait.
    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

    Please push the back button and reload the previous window.'
    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

    Please push the back button and reload the previous window.'
    An internal error has occurred and the module cannot be displayed.
    There are no results that meet this criteria.
    Search Result for "|||"