import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; public class UpdateLivestreamTemplate4 { public static void main(String[] args) { try { Class.forName("oracle.jdbc.OracleDriver"); Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521/sisvietnam", "sisvietnam", "sisvietnam"); // Re-apply the URL to be just the embed URL without autoplay so we can append it cleanly in data-src PreparedStatement updatePost = conn.prepareStatement( "UPDATE sis_post SET meta_description = ? WHERE slug = 'sis-vi-suc-khoe-cong-dong-ky-134'" ); updatePost.setString(1, "https://www.youtube.com/embed/j63kT9Bjrb4?si=N5JwIcuRn-iRxkYu"); updatePost.executeUpdate(); // We ensure it is just the standard embed without JS tampering String htmlTemplate = "\n" + "
\n" + "
\n" + "
\n" + "
\n" + "

LiveStream

\n" + "
\n" + "
\n" + "
\n" + "
\n" + " {{#each livestream_posts}}\n" + " {{title}}\n" + " {{/each}}\n" + "
\n" + "
\n" + "
\n" + " {{#each livestream_posts}}\n" + "
\n" + "
\n" + "

{{excerpt}}

\n" + "
\n" + "
\n" + "
{{content}}
\n" + "
\n" + "
\n" + " \n" + "
\n" + "
\n" + " {{/each}}\n" + "
\n" + "
\n" + "
\n" + "
\n" + " {{#each livestream_posts}}\n" + "
\n" + "
\n" + " \"{{title}}\"\n" + "
\n" + " \n" + "
\n" + " \n" + "
\n" + "
\n" + " {{/each}}\n" + "
\n" + "
\n" + "
\n" + ""; PreparedStatement updateTemplate = conn.prepareStatement( "UPDATE sis_component_template SET html_template = ? WHERE slug = 'tabbed-livestream'" ); updateTemplate.setString(1, htmlTemplate); updateTemplate.executeUpdate(); System.out.println("Update complete!"); conn.close(); } catch (Exception e) { e.printStackTrace(); } } }