Jump to content

Phillyman

Clients
  • Posts

    876
  • Joined

  • Last visited

  • Days Won

    2

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by Phillyman

  1. 1 hour ago, Jim M said:

    A third party storage system would be like S3, external storage accessed via FTP, or anything on your local system which connects outwards. If you utilize simple local storage on your server, that would not be third party.

    Did your hosting provider perhaps restore your database recently? I'm afraid, the software itself would not be able to change this on it's own.

    A long time ago I tried the option to offload a storage system to another server via FTP creds. It is not currently being utilized, but the entries do still exist. But as far as I am concerned they are legacy and not active. Just to be safe I removed them.

    I guess anything is possible with my hosting company, they could have moved or restored something. But I dont think so.

    What I will say is one thing did stick out to me from that post.....

    Quote

    Is there anything running on your server at time of this happening? (e.g. server/database backup, database cleanup tasks, etc...)

    I do have two cron jobs that are doing mysqldumps on timed intervals. The first one dumps a specific cms_custom_database every 6 hours to a backup file, the other one dumps the entire IPB database nightly. But these have been in place for years. Not sure if this is the best or recommended method for automating IPB backups. But maybe someone was trying to edit the database at the same time it was backing up and crashed the system. Again not sure, odd that I have been doing this for over 5 years and it becomes an issue now. Maybe?

  2. 7 hours ago, Marc Stridgen said:

    Im not sure where the above leads you to believe this was confirmed as a bug here, as that was not the case. Do you have any 3rd party storage systems as mentioned in the other topic? There is nothing within the software that would actively change anything at all in storage settings

    What is a Third Party Storage System?

    Are you asking me if I have any Third Party Modifications that have their own entries in the Storage System? I do run the modification IPB Tutorials, which has some entries that are set to the default.

    Or are you asking me if I run a Third Party Storage like Amazon S3?

    All my storage locations are pointed to local locations on my hosting and have been for years.

  3. 30 minutes ago, sound said:

     

    I had similar happen twice 

     

    Thank you, I had a feeling this was a bug and now this confirms it. Down to the same issue where it started with my license key being reported as expired/missing.

    Hopefully IPB can look into logs and see what the heck is going on. Not normal behavior for the community software. I have been running it since 2005 and never had something like this blow up.

  4. 1 hour ago, Jim M said:

    The first URL you provided looks accurate to the default configuration of the software. However, if you modified this, you would manage that from ACP -> System -> Files -> Storage Settings. 

    So I was able to FIX my issue, changing the storage locations back to what they SHOULD have been. But again, HOW did they change? I just looked in my Administrator logs, and I only see my changes to FIX them, how did they flip back to the original values, which they had not been for years?

    If it were a user mistake, I should have a log entry of the storage changing. Also if the location changes, the system should start moving them to the new location. Something is odd here.

     

     

  5. 1 minute ago, Jim M said:

    The first URL you provided looks accurate to the default configuration of the software. However, if you modified this, you would manage that from ACP -> System -> Files -> Storage Settings. 

    Yeah, but I modified this setting like 2-4 years ago. Which is why I am utterly perplexed. Why did the setting revert? Only 2 other people have the ability to change this setting, which I know they would not play with this.

    And its not even just 1 setting, they would have had to go thru 7 different storage locations and change it to the default, and even if they did, the system would have tried to move items back to that new location. Are we sure this is not a bug?

  6. Wait, god it sucks to troubleshoot this while dealing with covid and no food.

    Maybe a configuration file got changed, So lets look at my Avatar....

    The website is looking for....

    https://www.retromags.com/uploads/profile/photo-1.png

    but that location does not exist, I mean it used to like 5 years ago, but I just remembered its real location....

    https://www.retromags.com/rmg_fs/profile_photos/profile/photo-1.png

    No one would have changed this, but damn if it is not pointing to the old location. So what is the correct proceedure for pointing these data stores back to the correct location?

     

  7. Can anyone take a look at my community for me, I am afraid this may be the death of my 15 year old site. I am battling covid right now, havent eaten in days.

    I had my community backing up weekly. But those backups are corrupted as well. It is almost like hackers got in to my community years ago, offloaded my avatars and gallery images to their own hosting, then pulled the carpet on me the other night, leaving me with tons of broken images.

  8. Last night an admin of my site said there was a message about an invalid license key, I went and checked in the AdminCP and the issue seemed to go away, but now it looks like any thumbnails are messed up. What is caussing this to happen?

     

    Could contain: Text, Page, Menu, File

  9. I need two things to make my IP Pages Databases work better.

     

    First Job

    I need a custom IP Page made, that will run a SQL query against my IP Pages DB and return back a list of records.

    Example of code that used to work

    $result = mysqli_query($con,"SELECT `field_21`, `field_20`, `field_24`, `field_25`  FROM `ipb_ccs_custom_database_2` WHERE `field_77`='p' AND `field_75`='0' ORDER BY `ipb_ccs_custom_database_2`.`field_21` ASC, `field_20` ASC");
    while($row = mysqli_fetch_array($result)) {
      echo $row['field_21'] . " " . $row['field_24']. " " . $row['field_25'];
      echo "<br>";
    }
    
    mysqli_close($con);

    I would like a slight improvement on this, to make the text of the results, that each result be a hyperlink back to that record.

     

    Second Job

    I need the ability to run SQL statements against my IP Pages Database on a hourly or nightly schedule, and some of these statements may include more than 1 SQL statement to be executed in order. Right now I am having to run them manually, but they should really be nightly tasks.

    These tasks are kind of simplistic, If this field is set to X, then field 2 should always be Y.

    Example of statements

    UPDATE `ipb_ccs_custom_database_2` SET `record_static_furl` = `record_dynamic_furl`

     

    PM me the price to make both of these happen. 🙂

  10. 2 minutes ago, Kirill Gromov said:

    Hello, I don't think this will work with .us

    Ok, yeah I have a friend in Canada and he can use Binance.com, but I think legally if you are in the USA you must use the .US version of the website or risk them finding out about your account and shutting it down.

  11. This is the code that was working for about a year now, but after the last update it has broke.

     <h3 style="font-size: 24px;">{$file->name}</h3>
        {{if $file->container()->bitoptions['topic_screenshot'] and $file->primary_screenshot}}
        <br>
        <a href="{$file->url()}">
            {{$image = ( $file->primary_screenshot instanceof \IPS\File ) ? (string) $file->primary_screenshot->url : $file->primary_screenshot;}}
            <img src='{file="$image" extension="downloads_Screenshots"}' alt='{$file->name}' style='max-width: 360px'>
        </a>
        <br><br>
        {{endif}}
        <br>  

     

  12. 11 minutes ago, Nathan Explosion said:

    Lots is wrong.

    Instead of trying to fix the script (which dates from the IPB 3.x days), why not state what the intention of the script is? Then someone might be able to help out.

    I have a magazine database, it contains many fields.

    Name, Month, Year, Status, etc

    I want my members to be able to go to specific pages and pull back predefined queries. Any example would be something like "Magazines from the USA that are missing cover scans" or "Magazines that are currently missing"

    At the present, if a user wants to find this information, they have to go page by page and record by record, I just want to have some predefined SQL queries, that users can go to that IPB page, and get back a list of records.

    • [image] - Name - Month - Year - Country - Status - Hyperlink to Record
    • [image] - Name - Month - Year - Country - Status - Hyperlink to Record
    • [image] - Name - Month - Year - Country - Status - Hyperlink to Record
    • [image] - Name - Month - Year - Country - Status - Hyperlink to Record

     

    image.png.6075d33f9f73f7c13e84911ce612268f.png

  13. I had a script that went into my IPB Pages Database and brought back a list of records that met the query. I forget what version of IPB I upgraded to in the past that broke it. Anyone see what is wrong? Willing to pay to resolve.

    $con=mysqli_connect("localhost","database","password","username");
    // Check connection
    if (mysqli_connect_errno()) {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    
    $result = mysqli_query($con,"SELECT `field_21`, `field_24`, `field_25`  FROM `ibf_ccs_custom_database_5` WHERE `field_77`='s' AND `field_129`='' AND `record_approved`='1'
    ORDER BY `ibf_ccs_custom_database_5`.`field_21` ASC");
    
    while($row = mysqli_fetch_array($result)) {
      echo $row['field_21'] . " " . $row['field_24']. " " . $row['field_25'];
      echo "<br>";
    }
    
    mysqli_close($con);

     

    Results in...

    image.thumb.png.797125fcdd37d3149bcc062467cec90c.png

  14. On 9/10/2021 at 10:39 AM, Marc Stridgen said:

    Just to let you all know, there has now been a patch just released to resolve this issue. To apply the patch, please visit support in your Admin CP and select the "Optional Update" item shown

    I am not seeing this anywhere, I have hit the check for updates button.

  15. I love pages, always have to start with that. But it feels like we can do more. I am trying to build the largest database of searchable records for video game information. I feel like I need the ability to create records within records to accomplish my task. Lets take a look.

     

    Video Game Magazine Database

    • Name  - Nintendo Power Issue 1
    • Issue # - 1
    • Month - July/August
    • Year - 1988
    • Total Pages - 108p
    • Country - USA

     

    Video Games Database

    • Name - Super Mario Bros. 2
    • Publisher - Nintendo
    • System - Nintendo Entertainment System
    • Country - USA
    • Genre - Platformer

     

    Now how do I bridge those two databases, sure I could do a relational field, but that is going to get messy where some of these magazines are 100-500 video games mentioned, plus how do I give details about what was mentioned? So now I have to create a bridging database

     

    Bridge Database

    • Video Game Name - Super Mario Bros. 2
    • Magazine Issue - Nintendo Power Issue 1
    • Type of Mention - Review/Walkthru
    • Pages - 6-25

     

    Where I think it would function much easier, if I were able to allow these 4 fields to be added as many times as needed to the record in the Video Game Magazine Database, which would then save users from having to go into a separate database to enter information that should be a subset of information for these records.

    You may think this is a unique situation, but I can see this happening with Movie databases, where you would want to append actors into the records, or if you have a Music database and you have albums and want to append tracks to the record.

    My end goal is to be able to allow my members to have search boxes where they can say .....

    Show me "magazines" that mention "Pac-man" for the "gameboy" and are of type "review"

    or

    Show me "magazines" that mention "Shigeru Miyamoto" from "1990" and are of type "interview"

    Am I asking too much of IPB Pages, or am I missing a way to accomplish this currently?

     

     

  16. I grew impatient, so I rigged some recognition of my own. Follow at your own risk, and only after you have made backups!

     

    Go into ibf_cms_database_revisions from inside of PhpMyAdmin and export these two fields to a CSV file....

    • `revision_id`
    • `revision_member_id`

    You will end up with a CSV that looks something like this.....once saved open in Excel and save as a Tab Delimited file (Revisions.txt), store it in C:\Temp

    image.png.a0f864de26306aafca0019143dc10188.png

     

    Basically Record 19, updated by member 1, Record 20 updates by member 1...etc

    Well this is no good, I dont want to count how many times Member 1 edited a record, that could be thousands of times.....

    Lets use AutoHotKey to do some logic on this.....

    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    
    
    COUNT = 0
    PrevID = 9999999
    
    Loop, read, C:\TEMP\Revisions.txt
      {
    StringSplit, LineArray, A_LoopReadLine, %A_Tab%
      RevisID := LineArray1
      MembID := LineArray2
      
    
    If MembID = %PrevID%
    {
    COUNT++
    
    }
    else 
    {
    COUNT++
    FileAppend, UPDATE ``ibf_core_pfields_content`` SET ``field_44``='%COUNT%' WHERE ``member_id``='%PrevID%';`n, %A_ScriptDir%\Revisions-SQL.txt
    Count = 0
    }
    
    PrevID := MembID
    }
    
    MSGBOX, Done!

     

    So I wrote a small script to read the tab delimited data and then write out SQL commands to drop the final numbers back into a custom profile field. In my case it ended up being field_44, which is a profile field that can't be edited by my members.

    In the end I get a bunch of SQL commands to use in PHPMyAdmin, which now I can see who had how many revisions across all my databases.

    UPDATE `ibf_core_pfields_content` SET `field_44`='5053' WHERE `member_id`='1';

    Now we know that member 1 had 5053 database revisions.

    On the profile field side, I just created a text profile field, prevented members from editing it, and set the formatting like this.....

    <span class='fc'><img src="/images/database.png" alt="{$title}" title="{$title} - {$content}"></span>

    and now the database revisions show up on my profiles. Now if I could only learn how to do this automatically with PHP and Cron jobs 🤣

    Again, check your tables, fields and backup before you try any of this.

    image.png.b45cc6963381a852fc3d2f7183fbeb01.png

     

×
×
  • Create New...