Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • zizozoro Friend
    #163503

    Hello every body
    i am new in using joomla
    i have been used PHP-Fusion

    I am PHP and MySQL Programmer and i need to know how can i make my own module

    for example
    i want make a video block and get the embed code from database randomly
    see pics below

    are i need to create new tables using phpmyadmin and can i make in it the tables?
    Or
    are there something easy in joomla

    notes:
    1-i have seen JA hot videos module but it use html code (static) not randomly (dynamic)
    2-in PHP-Fusion you need to add new block only and write you own html or php code

    Thanks in advance


    1. newmod
    zizozoro Friend
    #390018

    i have made my own add page for hot videos module :laugh:
    create new file with name add.php
    copy the code and modify database name,user and pass
    [PHP]<?php

    $server_name = “localhost” ;//server , localhost
    $username_db = “” ; //Data Base Username
    $password_db = “” ; //BD pass
    $db_name = “”; //DB name

    mysql_connect($server_name,$username_db,$password_db);
    mysql_select_db($db_name);

    $action = $_GET[‘action’];

    switch($action){
    case(do_add_video_id):
    $video_id = addslashes(strip_tags(trim($_POST[‘id’])));

    $embed_video='<object width=”310″ height=”199″><param name=”movie” value=”http://www.youtube.com/v/’.$video_id.’?fs=1&hl=ar_EG&rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/’.$video_id.’?fs=1&hl=ar_EG&rel=0″ type=”application/x-shockwave-flash” width=”310″ height=”199″ allowscriptaccess=”always” allowfullscreen=”true”></embed></object>’;

    $sql = mysql_query(“update jos_modules set content = ‘$embed_video’ where id =’94’ “);
    if($sql){
    echo “<center><br>add successfuly :)<br><a href=./add.php>Go back</a></center>”;
    }
    else{
    echo “<center><br>an error occured, please try again later!!<br><a href=./add.php>Go back</a></center>”;
    }
    break;
    default:
    echo “
    <form action=”add.php?action=do_add_video_id” method=”POST”>
    <table align=center width=300 border=1 cellpading=0 cellspacing=2>
    <tr>
    <td>
    Video id
    </td>
    <td>
    <input type=”text” name=”id” size=30>
    </td>
    </tr>

    <tr>
    <td colspan = 2 align=center >
    <input type=submit value=”add”>
    </td>
    </tr>
    </table>
    </form>
    <br><center>
    <h5>example: http://www.youtube.com/watch?v=<font color=red><b>5_A8w00YZ88</b></font>
    <br>we will need to </font><font color=red><b>5_A8w00YZ88</b></font> only</h5></center>”;
    }
    ?> [/PHP]
    in this line you can replace 94 with your module Hot Videos ID (you can find it in module page )
    [PHP]$sql = mysql_query(“update jos_modules set content = ‘$embed_video’ where id =’94’ “);[/PHP]

    now i need to make buttun in adminpanel
    as below

    thanks in advance
    Zizo


    1. zizoooooooooooo
    Anonymous Moderator
    #390094

    Hi,

    I am afraid that currently, we could only offer technical support for as-is usage of all our templates/products only.

    Customized codes are beyond the support range. However, you can be here for getting advices from other users or easily find an expert to have the project done via a reliable freelance site: joomlancers.com, another network of JoomlArt.

    Thanks.

    zizozoro Friend
    #390261

    <em>@JA Developer 238918 wrote:</em><blockquote>Hi,

    I am afraid that currently, we could only offer technical support for as-is usage of all our templates/products only.

    Customized codes are beyond the support range. However, you can be here for getting advices from other users or easily find an expert to have the project done via a reliable freelance site: joomlancers.com, another network of JoomlArt.

    Thanks.</blockquote>
    Ok thanks to you

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  zizozoro 13 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum