Customizing SMF > Modifications and Packages

Adk Portal 2.1.1 (New version for SMF 2.0.x)

<< < (162/187) > >>

demityuh:
hi, would like to ask a question here regarding adk portal.
for Last Topic block. is there a way to modify it? i know that i have to do it manually through the Subs-adkblocks.php but it seem i can't really figure out what to insert to modify the way i want it to be. what i want is actually, by default the Last Topic block will have the link to the topic with the the last update and time and so on. it will also have an icon to go to the latest post. is there any way for me to modify it so it will show the number of pages of the thread?
instead of going to the latest post, can i have (let say last 5 pages for that particular thread) ?

Knn:
EDIT: I found the source of the bug. function Adk_portal_add_admin_areas in Subs-adkfunction.php was defined as:


--- Code: ---function Adk_portal_add_admin_areas($adminAreas)
--- End code ---

which means that it is modifying a copy of the array, and the original will not be modified, so the adk admin section will not be added.

I'm using PHP 5.4, and I think they changed how array parameters work in PHP 5.4, so that's why this code worked for everyone else.

The fix is simple, just add a &


--- Code: ---function Adk_portal_add_admin_areas(&$adminAreas)
--- End code ---

END EDIT

I've installed a Adk Portal 2.1.1 on a fresh, unmodified SMF 2.0.2. There were no errors during installation. When I click the redirect link which tries to take me to action=admin;area=adkadmin, I'm instead taken to the main admin center, and I can't find the adk settings anywhere.

Furthermore, when I try to edit the "Adk Portal was installed" news post on the main page, I am once again taken to the main admin settings area, but the error log contains the following error:

Undefined index: adk_block_include
File: C:/Program Files (x86)/EasyPHP-5.4.0RC4/www/forum3/Sources/Subs-adkfunction.php
Line: 166

I used the webinstaller, and I checked the english_utf8 language on the first page, under Additional Languages, but I also tried changing the default to english, and it still didn't work.

^HeRaCLeS^:

--- Quote ---Undefined index: adk_block_include
File: C:/Program Files (x86)/EasyPHP-5.4.0RC4/www/forum3/Sources/Subs-adkfunction.php
Line: 166
--- End quote ---

Test.
In file Subs-adkfunction.php
Search:

--- Code: --- //Adk Portal Blocks admin
if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'admin' && !empty($_REQUEST['area']) && $_REQUEST['area'] == 'blocks')
$buffer = str_replace('<td class="windowbg adk_10" style="text-align: center;">(include)</td>','<td class="windowbg adk_10" style="text-align: center;">('.$txt['adk_block_include'].')</td>',$buffer);

--- End code ---


Replace with:

--- Code: --- //Error log compatibilty ¿?
$txt_include = !empty($txt['adk_block_include']) ? $txt['adk_block_include'] : 'Include';

//Adk Portal Blocks admin
if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'admin' && !empty($_REQUEST['area']) && $_REQUEST['area'] == 'blocks')
$buffer = str_replace('<td class="windowbg adk_10" style="text-align: center;">(include)</td>','<td class="windowbg adk_10" style="text-align: center;">('.$txt_include.')</td>',$buffer);

--- End code ---

Costner:
probably a very easy one for someone to answer

The random image block, how to alter it so it opens the link specified in a NEW window rather than the current one?

thanks in advance

^HeRaCLeS^:
add target="_blank" in code for the link

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version