1,080,623 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by baig772

What code should I show you? I know that we cannot create the page turn effect in php. I cannot use jQuery or other javascript techniques because this applies only on image but I have a file. This module is available for Joomla Click Here
I just want to know the functionality of this module so that I can create my own (if not available for custom php). Is there any way to convert pdf file pages into images?

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

Hi all
I have a website about magazines and I want to upload the pdf file into it and create a flipping book effect for that uploaded file. I have seen many softwares but he problem is

  • I want to integrate this functionality in my website
  • I am using custom Php, (I have seen module and components for Joomla and Magento)
    Thanks in advance
baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

Thanks for the quick reply @Pritesh, but it did not work. It moved the magnifying glass image out of the search box (small in width). Nothing changed in with the search box (with greater width)

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

I have a search form with only one text field. The problem is that the width of that text field is not same. the style is

form#index-table-form input[type="text"] {
                            width: 106px;
                            height: 24px;
                            position: absolute;
                            outline: none;
                            right: 0;
                            top: 6px;
                            border: 1px solid #3772af;
                            padding-left: 6px;
                            padding-right: 24px;
                            font-family: Arial, Helvetica, sans-serif;
                            font-size: 14px;
                            font-weight: bold;
                            color: #0c4784;
                            background: white;
                            -moz-box-shadow: 0px 1px 2px 0px #737373;
                            -webkit-box-shadow: 0px 1px 2px 0px #737373;
                            box-shadow: 0px 1px 2px 0px #737373;
                            behavior: url("js/PIE.htc");
                        }

But the width and height is not the same on different pages. I cannot use the inline style or important to set the dimensions.
searchbox2
searchbox1

see the size of both text boxes is not same, though its a very minor difference

Attachments searchbox1.png 6.75KB searchbox2.png 7.1KB
baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

Please share what you get when you do

ehco "<pre>;
print_r($_POST); 
echo "</pre>";"
baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

I am very new to wordpress. I am hivaing a small problem in my site. I am using a custom template for the home page, I have category filters on top, on mouseover it shows the total no. of models in that specific category. Well the problem is, I have done the pagination as asked in my previous qiestion but this category wise filter does not work with pagination. For example you bring the mouse over "0-12 Boys", it will show you 3 but when you click on that, it will bring only 1 (other 2 are on the next page)

Here is my site http://ibay.co.za/faces/

Any help will be appreciated. Please let me know if I have to show you some of my theme codes etc. etc.

Thanks :)

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

@blocblue: I am using a custom theme, named as Ying_and_yang of onion eye. Now there is pagination but its returning the same results on each page :(

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

I am using a plugin wp_paginate

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

Its been alot of mess to make the pagination in wordpress :(
I have the pagination, but it renders the same page
template file is

?php get_header(); ?>

    <?php    
        global $my_query;
global $paged;
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$temp = $my_query;
$my_query = null;

$args  = array( 
    'post_type' => 'portfolio', 
    'paged' => $paged, 
    'posts_per_page' => 16, 
);
$my_query = new WP_Query( array( 'posts_per_page' => '-1', 'post_type' => 'portfolio' ) );
//do some work

//calling paginate
wp_paginate();
$wp_query = null; 
$wp_query = $temp;
?>

paginate function is

function paginate($args = false) {

                    if ($this->type === 'comments' && !get_option('page_comments'))
                return;

            $r = wp_parse_args($args, $this->options);
            extract($r, EXTR_SKIP);

            if (!isset($page) && !isset($pages)) {


                            global $wp_query;
                            $wp_query->query('post_type=portfolio&posts_per_page=16&paged=' . $paged);
                if ($this->type === 'posts') {
                    $page = get_query_var('paged');
                    $posts_per_page = intval(get_query_var('posts_per_page'));
                    $pages = intval(ceil($wp_query->found_posts / $posts_per_page));
                }
                else {
                    $page = get_query_var('cpage');
                    $comments_per_page = get_option('comments_per_page');
                    $pages = get_comment_pages_count();
                }
                $page = !empty($page) ? intval($page) : 1;
            }

            $prevlink = ($this->type === 'posts')
                ? esc_url(get_pagenum_link($page - 1))
                : get_comments_pagenum_link($page - 1);
            $nextlink = ($this->type === 'posts')
                ? esc_url(get_pagenum_link($page + 1))
                : get_comments_pagenum_link($page + 1);

            $output = stripslashes($before);
            if ($pages > 1) {
                $output .= sprintf('<ol class="wp-paginate%s">', ($this->type === 'posts') ? '' : ' wp-paginate-comments');
                $output .= sprintf('<li><span class="title">%s</span></li>', stripslashes($title));
                $ellipsis = "<li><span class='gap'>...</span></li>";

                if ($page > 1 && !empty($previouspage)) {
                    $output .= sprintf('<li><a href="%s" class="prev">%s</a></li>', $prevlink, stripslashes($previouspage));
                }

                $min_links = $range * 2 + 1;
                $block_min = min($page - $range, $pages - $min_links);
                $block_high = max($page + $range, $min_links);
                $left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;
                $right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;

                if ($left_gap && !$right_gap) {
                    $output .= sprintf('%s%s%s',
                        $this->paginate_loop(1, $anchor),
                        $ellipsis,
                        $this->paginate_loop($block_min, $pages, $page)
                    );
                }
                else if ($left_gap && $right_gap) {
                    $output .= sprintf('%s%s%s%s%s',
                        $this->paginate_loop(1, $anchor),
                        $ellipsis,
                        $this->paginate_loop($block_min, $block_high, $page),
                        $ellipsis,
                        $this->paginate_loop(($pages - $anchor + 1), $pages)
                    );
                }
                else if ($right_gap && !$left_gap) {
                    $output .= sprintf('%s%s%s',
                        $this->paginate_loop(1, $block_high, $page),
                        $ellipsis,
                        $this->paginate_loop(($pages - $anchor + 1), $pages)
                    );
                }
                else {
                    $output .= $this->paginate_loop(1, $pages, $page);
                }

                if ($page < $pages && !empty($nextpage)) {
                    $output .= sprintf('<li><a href="%s" class="next">%s</a></li>', $nextlink, stripslashes($nextpage));
                }
                $output .= "</ol>";
            }
            $output .= stripslashes($after);

            if ($pages > 1 || $empty) {
                echo $output;
            }
        }
baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

why you are having same conditions in your else if's ??
It can be done by nested ifs. do another check in your ifs i.e. from which currency to what currency??

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

i am applying the highlighting on all over the text in which html tags are also there

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

have you created the object properly? i mean what is $dbc

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

I have a search form, in which a user enters a keyword and it displays the results with the keyword in description as highlighted text, for highlighting, i have used another class on that keyword. problem is that, if there is a keyword in some hyperlink or in some <img> tag, it also applies that class there that causes the image load failure and links are not working.

That is how i am fetching my results and highlighting them if there is any keyword.

<?php 
if($_GET['key']){ 
        $key = $_REQUEST['key'];
$sql = "select * from tbl_feed WHERE title LIKE '%$key%' OR description like '%$key%'";
$rs  = $dbFun->selectMultiRecords($sql);
for($j=0;$j<count($rs);$j++){
        $title= mb_convert_encoding($rs[$j]['title'], "iso-8859-1","auto");
        $desc   = mb_convert_encoding($rs[$j]['description'],"iso-8859-1","auto");
        ?>
        <?php
      for($i = 0; $i < sizeof($arrKeywords); $i++){
                        $title = str_ireplace($arrKeywords[$i], "<font class=\"highlight\">" . $arrKeywords[$i] . "</font>", $title);
                        $desc = str_ireplace($arrKeywords[$i], "<font class=\"highlight\">" . $arrKeywords[$i] . "</font>", $desc);
                    }
      ?>

<a href="<?=$rs[$j]['link']?>" target="_blank"><strong><?=$title?></strong></a><BR />
<?=$rs[$j]['pubdate']?><BR /><BR />
<?=$desc?><BR /><BR /><BR />
<? }
}

is there any way that it skips the html tags from replacing?

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

LPS: as you said, this is very easy to do but if I do this task in your way,

mysql_query();

will be executed at least 4 times which may cause some performance problem and its also not a good practice to send connections to mysql every time?
I have read that in case of huge data, this practice can also lead to crash :( so i will not recomend any body to do that practice.
Hope i am clear now? :)

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

I have the following table structure of my db:

  • tbl_project

  • tbl_employee

  • tbl_deliverable

  • user_to_deliverable
    as tbl_prjct and tbl_deliverable has 1-many relation, tbl_employee and tbl_deliverable have many-many relation so they are splited into user_to_deliverable table

All i want is that a query to show project_name(from tbl_project), project's deliverables (from tbl_deliverable) and emloyee name to which that specific deliverable is assigned to.

Can i get help with this?

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

you can use the same as admin, you just have to check if it is commin gfrom admin, status will be 1 and if its from user, status will be 0

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

if the user can enter the article, bydefault set its article status as 0 and then let the admin to view all the articles from where he csn change the status and where you have to show the articles, you can select the articles like
select * from article where status = 1

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

We can host a wordpress blog on windows server it must have php and mysql installed in it. Or you can use some packages like xampp or wamp

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

in any database, if primary key is once deleted, it can never be used again. To reset the primary key, you have to TRUNCATE your table which will result in loss of all the data. So i will not suggest you to reset the table

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

the probelm was because of short tags
i changed

<? to <?php in db.php and it was working

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0
 
© 2013 DaniWeb® LLC
Page generated in 0.1211 seconds using 2.7MB