<hook id="ft_about_end"><![CDATA[


ob_end_clean();
?>
    <p id="copyright"><?php echo sprintf($lang_common['Design by'],'<a href="http://keydogbb.info"><img src="'.$ext_info['path'].'/img/info.png" alt="PunBB" width="16" height="16" border="0"/></a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?></p>
<?php   
        ]]></hook>

=   Notice: Undefined index: Design by in      .......... footer.php(46)     line 12

$tpl_temp = forum_trim(ob_get_contents());
ob_end_clean();
echo str_replace(array($lang_common['Powered by'],'<a href="http://punbb.informer.com/">PunBB</a>'), array($lang_common['Design by'],'<a href="http://keydogbb.info"><img src="'.$ext_info['path'].'/img/info.png" alt="PunBB" width="16" height="16" border="0"/></a>'), $tpl_temp);


any idea why the above is not replacing the powered by?
it just keeps using the powered by instead of design by.....

does the forum_trim need to take account of the array differently?

stuck...

thx star! big_smile
bestest fastest coder out there big_smile

1,479

(31 replies, posted in Feature requests)

well if you think someone like me with help can maintain a fork - i say go for it! I have time - just not much knowledge big_smile / i can provide a domain, forum etc.... just can't code smile

and yes that with just the forums of one of the 3 cats being called is exactely what i was talking about....

1,480

(31 replies, posted in Feature requests)

extension is fine in this specific case of course! smile
as punbb core is all about simplicity
but for all this stuff to work fast etc like cereal says wouldn't certain things be in core to call upon afterwards?
on ajax topic;
assuming i have a forum open - an active one - and i'm monitoring posts as an admin - it would be great to have the cells showing posts auto refresh - using something ajax'y ? kind of like screens you see betting sites or stock quoting sites use?

back again neutral
trying to replace the powered by  with design by in addition to the initial working code
my question : how do i seperate the $lang_common['Powered by']  from the '<a href....>' ?
do i do so with a ,    or  what?  that will mess up the str_replace i guess
input welcome

  <hook id="ft_about_end"><![CDATA[

$tpl_temp = forum_trim(ob_get_contents());
ob_end_clean();
echo str_replace($lang_common['Powered by']'<a href="http://punbb.informer.com/">PunBB</a>', $lang_common['Design by'] '<a href="http://keydogbb.info"><img src="'.$ext_info['path'].'/img/info.png" alt="PunBB" width="16" height="16" border="0"></a>', $tpl_temp);   
        ]]></hook>

PS: i have added in my lang_common design by .... not that you think that's causing error

idea will be at end to have extension that says:

Powered by []   
Design by []

or something like  Code:[] Design:[]

for the moment i'm just trying to get the powered by replaced though

thanks.

1,482

(31 replies, posted in Feature requests)

i really think this should be GREENlighted in whatever way possible.
it's exactely what user will want (i think)

just example - I now have a forum with 3 categories and 9 forums total. I'd like to be able to set it so that when users come to page they just see  3 categories (maybe total number of forums and total posts)   THEN they click on category and the forums show/expand below it.

i believe that is something which would be easier with your framework right cereal?

PS: and i think this should be fork/branch whatever... i'm pretty confident it would generate interest fast and prove successful.... IMHO.

nice clean look . well done. hope the client is happy and it attracts users smile

1,484

(41 replies, posted in PunBB 1.3 extensions)

@neck
Found this code written (GPL) for phpBB by fraev - if you could add those services to your next release would be cool.

Video Sites

Chrs.

@at all - now i get it - thx will ammend big_smile

you are making reference to the other post? or the demo site?
the other posts in troubleshooting has a </a> orphan smile but i changed that

cos my demo is working in chrome, ie7 and ff

What does it do?
It replaces the text punbb bottom right corner with a png (in the case of my extension a small blue information symbol) that leads to a url of your choice (extension uses my site big_smile - you can change it back to punbb.org or whatever...)
Install Instructions
1. download & unpack
2. change url in manifest from keydogbb.info to X
3. add your own png to img folder (its called info.png in my case)
4. upload to your extensions folder and
5. one-click install in admin 


Download

Demo (bottom right corner tongue)

Cool would be if one could just set the url in the admin section, but I'm not really capable of that yet! But that's where this thing should be going I guess....

Feedback welcome as always.

so you'd replace this : (that shows the png and powered by next to powered by punbb )

    <hooks>
        <hook id="ft_about_end"><![CDATA[
?>
    <p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/"><img src="'.$ext_info['path'].'/img/punbb.png" alt="PunBB" width="16" height="16" border="0"></a>')?>
</p><?php
    
        ]]></hook>
    </hooks>

with this?

    <hooks>
        <hook id="ft_about_end"><![CDATA[

$tpl_temp = forum_trim(ob_get_contents());
ob_end_clean();
echo str_replace('>PunBB<', '<img src="'.$ext_info['path'].'/img/punbb.png" alt="PunBB" width="16" height="16" border="0"></a>', $tpl_temp);    
        ]]></hook>
    </hooks>

don't leave anything out... smile step by step

thank you

hm thats not working my end. you dont know if I can use  str_replace  to just overwrite the footer (red) ?

<p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?></p>

  <p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/"><img src="'.$ext_info['path'].'/img/punbb.png" alt="PunBB" width="16" height="16" border="0"></a>')?>
</p>

in a nutshell i want to replace red with green smile

this is in footer.php ....

// End the transaction
$forum_db->end_transaction();

?>
    <p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?></p>
<?php
($hook = get_hook('ft_about_end')) ? eval($hook) : null;

$tpl_temp = forum_trim(ob_get_contents());
$tpl_main = str_replace('<!-- forum_about -->', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <!-- forum_about -->

I want to replace with an extension that puts image (with link) instead of text - just so in future I can add anyones website logo....

    <hooks>
        <hook id="ft_about_end"><![CDATA[
?>
    <p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/"><img src="'.$ext_info['path'].'/img/punbb.png" alt="PunBB" width="16" height="16" border="0"></a>')?>
</p><?php
    
        ]]></hook>
    </hooks>

it is however only ADDING not replacing (it does work) - shows image and everything right, but ADD not replaced... sad

I looked at str_replace command - but I don't know which of first code block above needs to go in it... this isnt working:

    str_replace (sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')), sprintf($lang_common['Powered by'], '<a href="http://punbb.org"><img src="'.$ext_info['path'].'/img/punbb.png" alt="FluxBB" width="16" height="16" border="0"></a>'))

1,492

(5 replies, posted in PunBB 1.3 troubleshooting)

.brd .posthead, .brd .postbody, .brd .post-options {
    background: #f9f9f9;
    }
line 98 or around...

but you want to change the color of post text not background?
not sure if you cld just add whatever color to above

EDIT: or just take out  .brd .postbody and place on new lines   and add background and color as you wish maybe...

1,493

(5 replies, posted in PunBB 1.3 troubleshooting)

.brd .main-subhead {
    border-color: #DFE6ED #DFE6ED #CBD1D8 #DFE6ED;
    background: #F4F4F4;
    }
around line 319 no?
maybe just add your new color to that - as you don't want rest to change....??

1,494

(31 replies, posted in PunBB 1.3 discussion)

yes that looks like what my install part of manifest.xml needs...
rating , page and ip i believe need to be in install part

1,495

(31 replies, posted in PunBB 1.3 discussion)

    <install>
     <![CDATA[
                // Adding SQL statement / creating table /installation code
            $schema = array(
                'FIELDS'        => array(
                        'id'            => array(
                        'datatype'        => 'SERIAL',
                        'allow_null'    => false
                    ),
                    'cat_name'        => array(
                        'datatype'        => 'VARCHAR(80)',
                        'allow_null'    => false,
                        'default'        => '\'o_ratings_category\''
                    ),
                    'disp_position'    => array(
                        'datatype'        => 'INT(10)',
                        'allow_null'    => false,
                        'default'        => '0'
                    )
                ),
                'PRIMARY KEY'    => array('id')
            );
            $forum_db->create_table('ratings', $schema);        
        ]]>  
    </install>

well that depends; I have PRIMARY KEY   ip , page      that need to be added
that is kind of my question, how to add those properly...

see in include/rate.php afterwards I use

function rate()
{
    $star_value = forum_htmlencode($_GET['r']);
    $page       = forum_htmlencode($_GET['p']);
    $ip         = $_SERVER['REMOTE_ADDR'];
   
    //Add to database
    $query = array(
        'INSERT'    => 'ip, rating, page',
        'INTO'        => DB_TABLE,
        'VALUES'    => $ip.', '.$star_value.', '.$page
    );
    $forum_db->query_build($query) or error(__FILE__, __LINE__);
    $ref = $_SERVER['HTTP_REFERER'];
    redirect($ref, 'Redirecting, Please wait &hellip;');
}

 

thats where I'm coming from....

EDIT: changed it to this now

        <install>
       <![CDATA[
                // Adding SQL statement / creating table /installation code
       if(!$forum_db->table_exists('ratings'))
       {
            $schema = array(
                'FIELDS'        => array(
                        'id'            => array(
                        'datatype'        => 'SERIAL',
                        'allow_null'    => false
                    ),
                    'cat_name'        => array(
                        'datatype'        => 'VARCHAR(80)',
                        'allow_null'    => false,
                        'default'        => '\'o_ratings_category\''
                    ),
                    'disp_position'    => array(
                        'datatype'        => 'INT(10)',
                        'allow_null'    => false,
                        'default'        => '0'
                    )
                ),
                'PRIMARY KEY'    => array('id')
            );
            $forum_db->create_table('ratings', $schema);
       }        
        ]]>  
    </install>
     <uninstall><![CDATA[
        // Uninstallation code
           $forum_db->query('DELETE FROM '.$forum_db->prefix.'config WHERE conf_name = "o_ratings_category");
        $forum_db->drop_table('ratings');
    ]]></uninstall>

but I need advice on how to get consistency between  manifest.xml and include/rate.php !

1,496

(31 replies, posted in PunBB 1.3 discussion)

    <uninstall><![CDATA[
    // Uninstallation code
        if ($forum_db->field_exists('o_ratings_category'))
        $forum_db->drop_field('o_ratings_category');
           
        if ($forum_db->table_exists('ratings'))
        $forum_db->drop_table('ratings');
    ]]></uninstall>

something like that then? replace categories with ratings in my case

cool thx @ both

1,498

(31 replies, posted in PunBB 1.3 discussion)

These are the three files that this rating extension has
(plus there is a folder "/stars/" with the images)
include/rate.php
rate.js
manifest.xml
(links lead to my forum - just so that not all the code is cluttering this post!)

I would appreciate anyone (dev, etc) taking a hard look at it -  as I can't get it to work yet.

Main trouble being:

1. uninstall section in manifest.xml  aswell as unsure about install manifest.xml

2. hooks are working for placing in header but only show "ratings" text, instead of showing the gif of stars rating

any feedback welcome
PS: if anyone can make this work for $ - just give me a price and satisfaction guarantee big_smile

still haven't given up this thing. need it! want it! smile

1,499

(31 replies, posted in Feature requests)

@ garciat: I guess then for search functions it could be used?
A list being populated as one enters search criteria....

Or forum board auto refreshing latest posts info...

Stuff like that. Would be cool....


@utchin
EDIT: okay cheers utchin will check out
http://jqueryfordesigners.com/demo/coda-bubble.html  <-- that one would be cool for what I need... will try and look at it. or get help big_smile
EDIT2: after looking at it - see its commercial...  so no good for  free extensions for bb . but the feel i personally like of it.   but cereal is talking about a larger picture and that should be followed up by punbb devs.... (in my opinion)

IGNORE my question

$sorrry for wasting your time


sorted .... thx