prnt.sc/s7lcfq how to remove any officers?
how to remove an officer?
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
1. Зайди в PhpMyAdmin
2. Найди uni1_vars
3. Найди по ID нажми на крестик -
I did as you said but still stands
-
-
cronos86 wrote:
I did as you said but still stands
A new serialized vars data will be generated. -
I cleared the cache from the admin panel and also deleted it in Cache/cache.wars.php again it stops still stands still
-
cronos86 wrote:
I cleared the cache from the admin panel and also deleted it in Cache/cache.wars.php again it stops still stands still
My question is, what you really want to delete? The officier? The requriements? -
Check if you really deleted it from Database + you need to delete it from language files too.
-
I want to delete officers @Qwa
@Thranduil yes i deleted it from wars table i need to delete it from another table?
I found it from the language file and deleted it -
vars and vars_requirament tables if I am not wrong.
-
show them if necessary,
edit template page.officiers.default.tpl
{foreach}
{if ID != 500} // ID of officer you want to remove.
display
{/if}
{/foreach}
simplest way -
amamoslavida wrote:
show them if necessary,
edit template page.officiers.default.tpl
{foreach}
{if ID != 500} // ID of officer you want to remove.
display
{/if}
{/foreach}
simplest way
-
definitely the dangerous one, do as i said if you play by yourself on localhost only. Otherwise you need to go through database processes.
-
Yaro2709 wrote:
amamoslavida wrote:
show them if necessary,
edit template page.officiers.default.tpl
{foreach}
{if ID != 500} // ID of officer you want to remove.
display
{/if}
{/foreach}
simplest way
Кто к нам с чем зачем, тот от того и того! -
cronos86 wrote:
prnt.sc/s7lcfq how to remove any officers?
Кто к нам с чем зачем, тот от того и того! -
i am not sure but using if-else statement in tpl file through smarty should count as back end , and for any user it should be not editable.
short way of removing oficer
Open pageofficier.default.tpl
{foreach $officierList as $ID => $Element}
{if $ID != 601 && $ID!=602 && $ID!=603 && $ID!=605 && $ID!=607}
..... html goes here ....
{/if}
{/foreach}
now officer with id 601, 602, 603, 605, and 607 is not visible, you can check IDs from language > TECH.php and edit like you want. I
2nd way.
Open ShowOfficierPage.class.php
find foreach($reslist['officier'] as $Element)
foreach($reslist['officier'] as $Element)
{
if ($Element != 601 && $Element != 602 ){ // add this line respectively
if (!BuildFunctions::isTechnologieAccessible($USER, $PLANET, $Element))
continue;
$costResources= BuildFunctions::getElementPrice($USER, $PLANET, $Element);
$buyable= BuildFunctions::isElementBuyable($USER, $PLANET, $Element, $costResources);
$costOverflow= BuildFunctions::getRestPrice($USER, $PLANET, $Element, $costResources);
$elementBonus= BuildFunctions::getAvalibleBonus($Element);
$officierList[$Element] = array(
'AllPlanets' => $AllPlanets,
'level'=> $USER[$resource[$Element]],
'maxLevel'=> $pricelist[$Element]['max'],
'costResources'=> $costResources,
'buyable'=> $buyable,
'costOverflow'=> $costOverflow,
'elementBonus'=> $elementBonus,
);
}
} -
aurum79 wrote:
Yaro2709 wrote:
amamoslavida wrote:
show them if necessary,
edit template page.officiers.default.tpl
{foreach}
{if ID != 500} // ID of officer you want to remove.
display
{/if}
{/foreach}
simplest way
cloud.mail.ru/public/dQiH/38FWNemR9
Смотри сам -
no i didn't remove officer from the array, no need
deleting from database and so on cause too much time,
btw you can test my version @ ogniter.net you' re welcome to play :)) -
Почему это работает? Вот смотрите код:
1. Это POST запрос, он верен, когда в обработку идет ID элемента, который находится в массиве $reslist['officier'].
2. Дальше мы $reslist['officier'] прогоняем через foreach. Значит все будет работать для любых ID в $reslist['officier'].
3. Итог: вы не убрали офицера из массива, а значит отредактировав POST запрос с помощью HTML, все можно купить.
Вывод: это дыра. -
amamoslavida wrote:
no i didn't remove officer from the array, no needdeleting from database and so on cause too much time,
btw you can test my version @ ogniter.net you' re welcome to play :))
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0